Log axis tickvalue format [message #21727] |
Mon, 18 September 2000 00:00  |
jeyadev
Messages: 78 Registered: February 1995
|
Member |
|
|
No doubt an oft asked question .... but I do not find it in my 'help box',
the FAQ, or even in David's book ..... :-( I am using PV Wave 6.01 on a
Solaris box.
I am plotting simple x-y data with log axes, and, while the x axis labels
are of the form "10 raised to an integer" (i.e. the PV Wave format
10!en
where n is an integer). However the y axis (which just spans the range
0.00001 to 0.0001 - just one decade) has the decimal representation.
How can I force those labels to be in the same format as those of the
x axes. Obviously, I would like to avoid specifying an array of labels
and using them as that would become cumbersome when many decades are
spanned. The example log axis plot in the PV Wave User's Guide has 4
decades of data with the labels in "Fortran real" format. In any case,
why does PV Wave choose the "nice" format for the x axis?!
I guess I am looking for a clever use of a keyword or the format
specification of the YTICKFORMAT keyword.
Thanks in advance,
--
Surendar Jeyadev jeyadev@wrc.xerox.com
|
|
|
Re: Log axis tickvalue format [message #21781 is a reply to message #21727] |
Thu, 21 September 2000 00:00   |
jeyadev
Messages: 78 Registered: February 1995
|
Member |
|
|
In article <39C86511.2F90372F@uni-bayreuth.de>,
Markus Reichstein <markus.reichstein@uni-bayreuth.de> wrote:
> Surendar,
> I'm not aware of a simple and elegant solution, i.e. without doing
> everything by yourself. However, the following short procedure might
> serve as a starting point, albeit far from being mature. . I needed it
> once, and it was OK for my purposes.
>
> Every order of magnitude is labeled, which causes space problems if the
> data range is more than 10 orders of magnitude or so. Then the number of
> 'tickVals' has to be reduced
>
> Cheers,
> Markus
>
>
> PRO logPlot, x,y
>
> ..... [ stuff deleted ] ......
This kind of thing really amazes me! I would guess that most users would
want such a feature built in.
It is my candidate for the 'wish list' that was recently discussed.
Thanks for the help. I had come to a similar workaround, but the state
of affairs is, IMHO, ridiculous!
--
Surendar Jeyadev jeyadev@wrc.xerox.com
|
|
|
Re: Log axis tickvalue format [message #21810 is a reply to message #21727] |
Wed, 20 September 2000 00:00   |
Markus Reichstein
Messages: 2 Registered: August 2000
|
Junior Member |
|
|
Surendar,
I'm not aware of a simple and elegant solution, i.e. without doing
everything by yourself. However, the following short procedure might
serve as a starting point, albeit far from being mature. . I needed it
once, and it was OK for my purposes.
Every order of magnitude is labeled, which causes space problems if the
data range is more than 10 orders of magnitude or so. Then the number of
'tickVals' has to be reduced
Cheers,
Markus
PRO logPlot, x,y
;**** Normal wave ticks
plot_oo, x,y, psym=-2
hak
xc=!x.crange & yc=!y.crange
;**** self-made ticks
ytickVals=indgen(yc(1)-yc(0)+1)+yc(0)
yticknames='10!U'+string(ytickVals, form='(I2)')+'!N'
xtickVals=indgen(xc(1)-xc(0)+1)+xc(0)
xticknames='10!U'+string(xtickVals, form='(I2)')+'!N'
plot_oo, x,y, psym=-2, xrange=10.^xc, yrange=10.^yc,$
ytickname=yticknames, ytickv=10.^ytickVals,
yticks=N_ELEMENTS(ytickVals)-1,$
xtickname=xticknames, xtickv=10.^xtickVals,
xticks=N_ELEMENTS(xtickVals)-1
END
--
>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Markus Reichstein
Department of Plant Ecology
University of Bayreuth
D-95440 Bayreuth
Germany
Ph.: +49 921 55 2061
FAX: +49 921 55 2564
e-mail: markus.reichstein@uni-bayreuth.de
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
|
|
|
Re: Log axis tickvalue format [message #21863 is a reply to message #21727] |
Fri, 22 September 2000 00:00  |
jeyadev
Messages: 78 Registered: February 1995
|
Member |
|
|
In article <39CB884C.ED6E66B9@cmdl.noaa.gov>,
Pavel Romashkin <promashkin@cmdl.noaa.gov> wrote:
> Surendar Jeyadev wrote:
>>
>> This kind of thing really amazes me! I would guess that most users would
>> want such a feature built in.
>>
>> It is my candidate for the 'wish list' that was recently discussed.
>>
>> Thanks for the help. I had come to a similar workaround, but the state
>> of affairs is, IMHO, ridiculous!
>
> Have you ever tried to come up with an algorithm that would
> automatically label axes but still satisfied people wanting different
> looks of their plots? It is very hard to do. IMHO, creating an array of
I take it that it cannot be done ....
> tick labels is not cumbersome at all, unless PV-Wave is a lot slower
> than IDL. About 4 lines of code should do, once you figure out how
> exactly do you want them to appear.
... and that is why I was wondering why there is not keyword for the
log axes labels -- why not roll the 4 lines of code into "plot"? I
would think that most users would *prefer* to see integer powers
of 10 that 0.00001, 0.0001, 0.001, ....
But, my education was long ago, and maybe, nowadays, students are
trained is fast zero counting. I need to take of my reading glasses,
peer closely, and count, very slowly, using a pencil as a pointer,
"One, two, three, ......". :-)
--
Surendar Jeyadev jeyadev@wrc.xerox.com
|
|
|
Re: Log axis tickvalue format [message #21869 is a reply to message #21727] |
Fri, 22 September 2000 00:00  |
promashkin
Messages: 169 Registered: December 1999
|
Senior Member |
|
|
Surendar Jeyadev wrote:
>
> This kind of thing really amazes me! I would guess that most users would
> want such a feature built in.
>
> It is my candidate for the 'wish list' that was recently discussed.
>
> Thanks for the help. I had come to a similar workaround, but the state
> of affairs is, IMHO, ridiculous!
Have you ever tried to come up with an algorithm that would
automatically label axes but still satisfied people wanting different
looks of their plots? It is very hard to do. IMHO, creating an array of
tick labels is not cumbersome at all, unless PV-Wave is a lot slower
than IDL. About 4 lines of code should do, once you figure out how
exactly do you want them to appear.
Cheers,
Pavel
|
|
|