LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.charting
external usenet poster
 
Posts: 120
Default topographical data maps in excel

You seem to have been neglected by our community.

Yes, it can be done, if I understand your intention correctly. The
topography in your approach means, in a sense, the 3D chart. The first two of
the three values defininig each point specify the x- and y-coordinates (like
on a map); the third value is represented by prescribed colors or shades.
You must have your variables ranged in three columns. On the base of the
first two you will create a normal scatter or line chart (trivial, as you
mention) with suitable (full background) markers. The task then will be done
by the following macro, while the new basic Series in the chart has been
pre-selected:

Option Explicit
Sub ColorPointValues()
'Petr Bezucha, 2008
Dim MarkersFormula As String, MarkersCount As Long, _
PosDiv1 As Long, PosDiv2 As Long, ColorI As Long, _
YRange As Range, DecisValue As Double, I As Long
With Selection
If .ChartType < xlXYScatter Then Exit Sub
MarkersFormula = .Formula
MarkersCount = .Points.Count
PosDiv2 = InStrRev(MarkersFormula, ",")
PosDiv1 = InStrRev(MarkersFormula, ",", PosDiv2 - 1) + 1
Set YRange = _
Range(Mid(MarkersFormula, PosDiv1, PosDiv2 - PosDiv1))
For I = 1 To MarkersCount
DecisValue = YRange(I).Offset(0, 1).Value
'--------------------------------
'here you must incorporate your decision process
'in the simplest case ColorI = DecisValue
'--------------------------------
.Points(I).MarkerBackgroundColorIndex = ColorI
.Points(I).MarkerForegroundColorIndex = ColorI
Next I
End With
End Sub

Macro uses the SERIES formula for the identification of Y-range, and its
neighbor, the Z-range. It is taking the points (markers) one by one, looks
into the Z-value €“ now DecisValue, and €¦ the work now comes up for you: the
gist is to obtain proper MarkerBackgroundColorIndex from the offer of the
ColorIndex table. You can either insert one or a series of Ifs, or Select
Case, etc. All depends on your demand and the number of your color
categories.

You may also decide on only Y-values. The necessary downgrade in the more
common macro is then €¦ .Offset(0,0). €¦ .

ColorIndex is the restriction, as for the color scale, of Excel 2003 and
downwards. With 2007 you can enjoy unchained RBG colors.
The details around colors you can find elsewhere.

Respond please if successful.

Regards

--
Petr Bezucha


"bobatduke" wrote:

I have seen this done, and would like to know how to create topgraphical maps
of data sets using excel. I want to take a sample of data ponts and plot the
points (easy), than color the plot based upon the values of the points

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Heat Maps - What Can be done in Excel? dransfield Excel Discussion (Misc queries) 2 January 16th 08 12:34 PM
is there any way i can view maps (say of the U.S) in excel? matt Excel Discussion (Misc queries) 1 May 10th 07 02:16 AM
Excel Maps of US [email protected] Charts and Charting in Excel 1 March 29th 06 12:08 AM
how can i produce regional maps with demographic data using excel. Pedro Charts and Charting in Excel 2 March 30th 05 01:50 PM
Country data maps Albert Excel Discussion (Misc queries) 0 February 24th 05 10:59 PM


All times are GMT +1. The time now is 02:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"