PC Review


Reply
Thread Tools Rate Thread

Color Weighting

 
 
=?Utf-8?B?ZW5hdW1hbg==?=
Guest
Posts: n/a
 
      3rd Apr 2004
I designed an RF signal strength mapping tool for our radio shop so they can map the relative repeater signal strengths around the plant. Basicly it is a laptop with a National Instruments DAQ board and a Garmin GPS head connected via RS232. Signal strength is fed into the DAQ board from a modified reciever. The output is a tab delimited text file that has 3 columns. GPS Lat & long and signal strength in dBm. My question to you Excel experts is... Can a chart be produced that would have Lat and Long as XY coordinates with each signal strength data point represented by a dot that varies in color proportinal to the numeric value? I could do it in AutoCAD but it would be nice if one of you Excel junkies can tell me a way to do it in this program..

Thanks in advance
Ed Nauma
Senior Enginee
Lockheed Martin Aeronautic
Palmdale, CA
 
Reply With Quote
 
 
 
 
Nicky
Guest
Posts: n/a
 
      6th Apr 2004
This is difficult because you can’t set the colors of a chart marker a
precisely as you could, say, a drawing object (eg circle or box). Yo
can only apply one of the set scheme colors. However, you can alte
these scheme colours in tools! options.

I could think of three partial solutions to your problem:

1. split your data into several different series according to signa
strengths. I have no idea what units or likely magnitudes these woul
show, but assuming values range from 0 to 100, you could have on
series for 0-25, another for 26-50 etc, each with different color dots


2. use a macro like this to give different points of a single serie
different scheme colors. Again, as above, these are collected int
groups, not fully variable according to the magnitude of the data. Th
values for signal strength are assumed to be in a range name
‘strength’. As mentioned above, you can alter the scheme colors i
tools! options.

note that both of these macros also add the signal stregth value as
data label to your markers
Sub vary__color_by_value()
Calculate
LUM_MAX = 100 'HIGHEST STRENGTH VALUE POSSIBLE
PT_MAX = 50 ' LARGEST SIZE OF POINT IN SCATTER CHART

For n = 1 To Range("STRENGTH").Cells.Count
pct = 10 + Round(10 * (0.05 + Range("STRENGTH").Cells(n).Value
LUM_MAX), 0) 'ratio of point size to maximum
ActiveChart.SeriesCollection(1).Points(n).Select
With Selection
.MarkerBackgroundColorIndex = pct
.MarkerForegroundColorIndex = pct
.MarkerStyle = xlCircle
.MarkerSize = 15
.Shadow = False
.DataLabel.Characters.Text
Sheets("SHEET1").Range("STRENGTH").Cells(n).Value
End With

Next
End Sub

3) rather than using color to differentiate the signal strength, wh
not use the size of the chart marker? This can be calibrated mor
precisely and maybe read more easily than scheme colors. This should d
the trick:

Sub vary__size_by_value()
Calculate
LUM_MAX = 100 'HIGHEST STRENGTH VALUE POSSIBLE
PT_MAX = 50 ' LARGEST SIZE OF POINT IN SCATTER CHART
For n = 1 To Range("STRENGTH").Cells.Count
pct = Range("STRENGTH").Cells(n).Value / LUM_MAX 'ratio of point siz
to maximum
If pct < 0.1 Then pct = 0.1 'minimum point size is 10% maximum
ActiveChart.SeriesCollection(1).Points(n).MarkerSize = pct * PT_MAX
ActiveChart.SeriesCollection(1).Points(n).DataLabel.Characters.Text
Sheets("SHEET1").Range("STRENGTH").Cells(n).Value
Next
End Su

--
Message posted from http://www.ExcelForum.com

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      10th Apr 2004
Carrying Nicky's suggestion a bit further, you can in fact make custom
markers with colors showing what you're interested in.

First, you need your three columns, just like you have. Plot an XY
Scatter chart with lat and long. Now step through each point, create a
drawing object (circle or whatever) the right size, and fill it with a
custom color based on signal strength. Copy it, then select the series
and point, and paste. The drawing object becomes a custom marker for
that point.

Turn on the macro recorder while creating and formatting the drawing
object, and while copying it, selecting the point, and pasting. This
gives you the syntax you need.

I used this procedure once to plot an array of arrows, with variable
orientation and length, to depict mass transfer on a chart. Line color
could have conveyed yet another variable.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
http://PeltierTech.com/Excel/Charts/
_______

Nicky < wrote:

> This is difficult because you can’t set the colors of a chart marker as
> precisely as you could, say, a drawing object (eg circle or box). You
> can only apply one of the set scheme colors. However, you can alter
> these scheme colours in tools! options.
>
> I could think of three partial solutions to your problem:
>
> 1. split your data into several different series according to signal
> strengths. I have no idea what units or likely magnitudes these would
> show, but assuming values range from 0 to 100, you could have one
> series for 0-25, another for 26-50 etc, each with different color dots.
>
>
> 2. use a macro like this to give different points of a single series
> different scheme colors. Again, as above, these are collected into
> groups, not fully variable according to the magnitude of the data. The
> values for signal strength are assumed to be in a range named
> ‘strength’. As mentioned above, you can alter the scheme colors in
> tools! options.
>
> note that both of these macros also add the signal stregth value as a
> data label to your markers
> Sub vary__color_by_value()
> Calculate
> LUM_MAX = 100 'HIGHEST STRENGTH VALUE POSSIBLE
> PT_MAX = 50 ' LARGEST SIZE OF POINT IN SCATTER CHART
>
> For n = 1 To Range("STRENGTH").Cells.Count
> pct = 10 + Round(10 * (0.05 + Range("STRENGTH").Cells(n).Value /
> LUM_MAX), 0) 'ratio of point size to maximum
> ActiveChart.SeriesCollection(1).Points(n).Select
> With Selection
> .MarkerBackgroundColorIndex = pct
> .MarkerForegroundColorIndex = pct
> .MarkerStyle = xlCircle
> .MarkerSize = 15
> .Shadow = False
> .DataLabel.Characters.Text =
> Sheets("SHEET1").Range("STRENGTH").Cells(n).Value
> End With
>
> Next
> End Sub
>
> 3) rather than using color to differentiate the signal strength, why
> not use the size of the chart marker? This can be calibrated more
> precisely and maybe read more easily than scheme colors. This should do
> the trick:
>
> Sub vary__size_by_value()
> Calculate
> LUM_MAX = 100 'HIGHEST STRENGTH VALUE POSSIBLE
> PT_MAX = 50 ' LARGEST SIZE OF POINT IN SCATTER CHART
> For n = 1 To Range("STRENGTH").Cells.Count
> pct = Range("STRENGTH").Cells(n).Value / LUM_MAX 'ratio of point size
> to maximum
> If pct < 0.1 Then pct = 0.1 'minimum point size is 10% maximum
> ActiveChart.SeriesCollection(1).Points(n).MarkerSize = pct * PT_MAX
> ActiveChart.SeriesCollection(1).Points(n).DataLabel.Characters.Text =
> Sheets("SHEET1").Range("STRENGTH").Cells(n).Value
> Next
> End Sub
>
>
> ---
> Message posted from http://www.ExcelForum.com/
>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Category weighting gViscardi Microsoft Outlook Calendar 1 12th Jun 2007 02:05 AM
weighting a cell kimber843 Microsoft Excel Programming 1 4th May 2006 07:01 AM
weighting a value? jvan100 Microsoft Excel Misc 3 30th Nov 2005 05:55 PM
How to apply a weighting Homer J Microsoft Excel Misc 0 12th Aug 2005 10:05 AM
Data weighting Microsoft Access 1 19th Nov 2004 05:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:21 PM.