Hi Olaf,
I think there are three different issues here.
1. For logarithmic axes, the min and max for the axis range *must* be
greater than 0, otherwise the X/Y/Z_LOG keywords have no effect and that
property is grayed out in the property sheet (I think this was Dave's
problem). So if you try to do a simple "iplot, findgen(10), /y_log", it will
ignore the y_log. However, "iplot, findgen(10)+1, /y_log" will work fine.
This isn't really a problem in your case, just a side note.
2. I think you've discovered a bug. It seems like x/y/z_log is not happy if
you do an overplot on top of a logarithmic plot. For some reason it sets the
axis range to 10^16, which is what you observed. We will fix this. As a
workaround, you can do all of your plots first, and then only set x_log on
the *last* overplot.
For example:
; Create fake data.
n = 101
max_nr = 5
; X goes from 0.038 up to 16.
Dp = FINDGEN(n)/100*16
Dp[0] = 0.038
Dp = REBIN(Dp, n, max_nr)
Dn = RANDOMU(s, n, max_nr)
duration = REPLICATE(1, max_nr)
xmin=min(Dp)
xmax=max(Dp)
ymax=max(Dn)
IPLOT, Dp[*,0], dN[*,0]/duration[0], $
XRANGE=[xmin,xmax], $
YRANGE=[0,ymax]
for i=1,max_nr-1 do begin
; Note: OVERPLOT is either "on" or "off", not an integer.
; To work around bug, only set X_LOG on the last overplot.
iplot, Dp[*,i], dN[*,i]/duration[i], /OVERPLOT, $
X_LOG=(i eq max_nr-1)
endfor
This seems to work fine.
3. You can do three-dimensional plots using "iplot".
For example:
; Try a three-dimensional plot. Use fake Z data.
; You could also rearrange the X/Y/Z args.
iplot, Dp[*,0], dN[*,0]/duration[0], FLTARR(n), $
XRANGE=[xmin,xmax], $
YRANGE=[0,ymax]
for i=1,max_nr-1 do begin
; Shift the next plot by some amount in Z.
IPLOT, Dp[*,i], dN[*,i]/duration[i], FLTARR(n)+i, /OVERPLOT, $
X_LOG=(i eq max_nr-1)
endfor
I just gave it a set of Z coordinates, one for each data point. Then I shift
the Z coordinates up by some amount, which would presumably be your "time".
You may need to do some tweaking of the axis range or the scaling or
rotation, but this should get you started.
Hope this helps.
-Chris Torrence
Research Systems, Inc.
"Olaf Stetzer" <olaf.stetzer@imk.fzk.de> wrote in message
news:bjn8vd$752$1@news.rz.uni-karlsruhe.de...
> Hello,
>
> I am trying to plot multiple size distributions of an
> aerosol in one plot. What I have tried so far: the plot
> structure of the J�lihc group, but it is limited to
> 25 datasets, in my case there can be 100 datasets.
>
> What I tried next is the new itools procedure iplot,
> but it does not work as i expected it to. First, the
> x axis should be logarithmic (values from 0.038 to 16 �m).
> When i set xrange to [min(xdata),max(xdata)] the axis ranges from
> ~0 to 10e16, so I tried alog10() of the above resulting in
> a LINEAR axis from -1.4 to 1.2 even though I have set /x_log.
> I cannot see a way to get the axis I want.
>
> Second I don't see any data in the plot although the visualisation
> manager shows all datasets (show=true). It's just my first try using
> itools, but it seems they are much less intuitive than I expected.
> Here is the code I used:
>
> xmin=min(Dp)
> xmax=max(Dp)
> ymax=max(50)
>
> for i=0,max_nr do begin
>
> if i eq 0 then begin
> iplot, Dp[*,i], dN[*,i]/duration[i], $
> /x_log,xrange=[xmin,xmax],yrange=[0,ymax]
> view_nr=itgetcurrent()
> endif else iplot, Dp[*,i], dN[*,i]/duration[i], $
> /x_log,xrange=[xmin,xmax],yrange=[0,ymax],overplot=view_nr
> endfor
>
> Omitting xrange, yrange and x_log does not change the result
> (as can be expected).
>
> Another question:
>
> Is there another easy way to get these plots done? I wonder
> if there is a way to get them in a 3D plot as stacked xy plots
> with z as the time of measurement but NOT as surface plots
> (but filled to the x-axis would be OK). Like this:
>
>
> y (counts, dN)
> |
> |
> | z(time)
> | / **
> | / **** *** **
> | / *** *** *****
> | ********** ******
> | / ++
> | / +++ +++ ++
> |++++ ++++++++++ ++++++++++++++++
> -------------------------------------------x (size, Dp)
>
> Hmmm, I hope you get my idea :-)
> So far, I haven't seen a way to do this in IDL.
>
> Thanks,
>
> Olaf
>
|