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 #80819 is a reply to message #80818] Fri, 13 July 2012 14:57 Go to previous messageGo to previous message
Oana Coman is currently offline  Oana Coman
Messages: 27
Registered: December 2011
Junior Member
Yep, it's exactly what I wanted.
And your code works for me, too.
I stripped my cgContour command down to the bare minimum and it worked(just the data, ranges, and aspect). Then started adding the extra stuff, and it worked fine until the /Window keyboard. Seems that's what is making my plot go crazy. Any reason why this should be? I added it to the code you posted, also, and /Window causes issues with that too.

On Friday, July 13, 2012 2:11:16 PM UTC-7, David Fanning wrote:
> ecatcom1@gmail.com writes:
>
> > Whoops! Light bulb just turned on!
> > New Code:
> > xrange=[xmin,xmax]
> > yrange=[ymin,ymax]
> >
> > numLevels=size(levels)
> > LoadCT, 33, NColorS=numLevels(1), Bottom=1
> > xran=xmax-xmin
> > yran=ymax-ymin
> > asp=yran/xran
> > cgContour,aa,x(ix),y(iy), /Fill,$
> > levels=levels, C_colors=Indgen(numLevels(1))+1,$
> > c_labels=levels, /Outline,$
> > xminor=5, yminor=5,$
> > xrange=xrange, yrange=yrange,$
> > xtickinterval=10, ytickinterval=10,$
> > ASPECT=asp,/Window
> >
> > When I am resizing my window, it keeps the aspect radio the same. Yay!
> > The problem is my plot doesnt show the correct aspect ratio. For example, I just plotted something with x=[-12,11] y=[-34,33], asp=2.91304 (i put a stop in my code and checked to see that all these values are correct and they are). But when it actually plots, the y-axis looks almost 5 times bigger than the x...which is not what I told it to do.
> > Any ideas why this could be happening? Is my code funky?
> >
> > Thanks for putting up with my sillyness!
>
> I don't know. This looks right to me. Here is the code
> I used:
>
> cgcontour, cgdemodata(2), xrange=[-12, 11], $
> yrange=[-34,33], aspect=67./23
>
> The distance from 0 to 10 on the X axis is the same as
> the distance from 0 to 10 on the Y axis. Isn't that
> what you wanted, for the distances to be in the same
> units?
>
> 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 19:30:14 PDT 2025

Total time taken to generate the page: 0.00424 seconds