Re: How to make scatter plot with colorbar in IDL? [message #85428 is a reply to message #85427] |
Fri, 02 August 2013 08:44   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Madhavan Bomidi writes:
> Can anyone provide me a sample / rough code where I can plot Figure 1 above and Figure 2 below on the same figure. Ultimate goal for me to make a movie while I make each figure for each time step. I could succeed making this in MATLAB. Please advise me with some suggestions or sample examples to realize my figures & thus movie.
Do you have enough interest to purchase a $50 consulting contract from
the Coyote Store? I'm just about to head off on a family vacation, but I
expect to be eliminated from the 1st Annual Richie Seemueller Black-
Light, Glow-in-the-Dark Family Ping Pong Tournament early and will
probably have some time to put something together. (I taught the damn
kids how to play and now they show NO respect! If I could just *see* the
ball, I could probably beat them.)
As you probably have already discovered you are doing it "all wrong".
:-)
Distances are probably linear in the small lat/lon range you are using,
but generally it is must easier to navigate images when you do it in
projected meter space, rather than lat/lon space. There is plenty of
code in the Coyote Library to help with this (e.g., cgGoogleMapWidget),
but you are putting things together in a fairly novel way. At the very
least, you are going to have to set up a coordinate system for your
image (maybe just using the [XY]Range keywords on cgImage) and then put
the scatter plot on using the /OVERPLOT keyword.
> My variable data ranges from 0 to 1200.So, my colorbar is also
> required to have 1201 divisions.
That's not going to happen. :-)
Colorbars generally have 256 colors, tops. Your eye wouldn't be able to
distinguish any more colors than this, probably, unless you were
planning to use one of the monitors on Times Square to display the color
bar.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|