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

Home » Public Forums » archive » Questions about NG image with (log) axis
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: Questions about NG image with (log) axis [message #85557 is a reply to message #85544] Thu, 15 August 2013 20:28 Go to previous message
Xin Tao is currently offline  Xin Tao
Messages: 40
Registered: April 2011
Member
On Friday, August 16, 2013 1:37:25 AM UTC+8, Chris Torrence wrote:
>
> Hi Xin Tao,
>
>
>
> Well, I think both David's coyote library and IDL's NG are going to have problems with a log axis for an Image. When I try David's code (yes, I have it installed!) the axes "look" correct, but the image is just plotted as a normal image.
>
>
>
> If the X axis were truly a "log" axis, then I would expect the pixels to be stretched out on the left side and get smaller as you moved to the right. For example, try the following:
>
>
>
> x=10.0+dindgen(300)*(100-10.0)/(300-1)
>
> y=dindgen(300)
>
> data = dist(300)
>
> c = contour(data, x, y, /xlog, /fill)
>
>
>
> Notice how the contour plot is more stretched out on the left side. Is this what you want? If so, then you aren't going to be able to use an Image (either from NG or Coyote). You could use a filled contour plot, say with n_levels=50.
>
>
>
> On the other hand, if you don't want a stretched out image, then you might want to take the log10 of your X data first, then do the i=image() and set the xtickvalues/xtickname to get the correct labels. In the meantime, I'll try to fix the Image function for IDL 8.3 so it at least gives the correct labels, even if it doesn't stretch out the pixels.
>
>
>
> Cheers,
>
> Chris
>
> ExelisVIS


Hi Chris,

Yes, I want a truely "logged" x-axis. In the example I gave, it will give me a stretched image. The problem I have in my mind, though, is to plot a 2D data whose x-axis is defined logarithmically. When I plot the 2D data, I imagine I should be able to do it with: image(data, x, y, /xlog).

I understand I can fix things by using xtickname/xtickvalues stuff, but that sounds too complicated for a simple thing like this, since /xlog is a keyword that has been defined. Look forward to using IDL8.3.

Thanks,

Xin Tao
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to clear a NG window without erase method?
Next Topic: 'Reading' a file from binary data?

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

Current Time: Wed Oct 08 18:07:46 PDT 2025

Total time taken to generate the page: 0.01373 seconds