comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Contour Plot Issues
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Contour Plot Issues [message #80842 is a reply to message #80841] Thu, 12 July 2012 13:44 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ecatcom1@gmail.com writes:

> Hi All! I have a seemingly-simple issue that I can't for the life of me get to work, and another issue mainly of existence.
>
> The first: I am trying to get a contour plot to plot with the spacing between minor/major ticks to be the same in the x and y direction. No matter what I try, I can't get this to work. I need to size of the plot itself to be able to change (so if i have 10 major ticks in x and 20 in y, I don't want the plot to be that size when, say, the next plot has 5 ticks in x and 15 in y because then the spacing between the x and y ticks won't be the same). Hope that made sense!
>
> Here's my code:
>
> cgContour,z,x,y, /Fill,$ ;Position=[0.125,0.025,0.9,0.8] I had a colorbar, but I can't hardcode a size to this plot since it will mess with my tick interval lengths depending on number of ticks I have, so commented this out
> levels=levels, C_colors=Indgen(numLevels(1))+1,$
> c_labels=levels, /Outline,$
> xminor=5, yminor=5,$ ;tried hardcoding the number of minor ticks
> xtickinterval=10, ytickinterval=10,$ ;tried hardcoding the interval size
> xticks=20,yticks=20,$ ;even tried hardcoding the number of ticks
> xstyle=1, ystyle=1,$
> xrange=[-20,20],yrange=[-20,20], /Window ;and tried to give it the same range as a last desperate plea to see if it would give me the same distance between ticks....but nope.
> Help!

Here it took me two minutes to add an ASPECT keyword to cgContour plot
for you. Set the ASPECT=1.0 and you will have what you want:

cgContour, ..., Aspect=1.0, /Window

Find the new program here:

http://www.idlcoyote.com/programs/cgcontour.pro

> The second issue: Is there a contour plot option anywhere that will >
> allow me to dynamically change the x and y range so i can zoom in/out?

Alas, not on a filled contour. It would be MUCH easier if you
gridded your data yourself and worked with the gridded data
as an image. Then almost anything is possible. :-)

Cheers,

David




--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Fastest way to list combinations
Next Topic: Re: Array Integration

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 18:16:36 PDT 2025

Total time taken to generate the page: 0.00468 seconds