Re: Equivalent of ytick_get() in function graphics? [message #93078 is a reply to message #93076] |
Thu, 21 April 2016 11:30   |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
Hello Wayne,
It sounds like you might want the tickname or tickvalues properties of a plot's axis:
p = plot(indgen(10),position=[0.1,0.525,0.95,0.95],xtickname=['' ])
p = plot(indgen(10)+2,position=[0.1,0.1,0.95,0.525],/current)
tn=(p['yaxis']).tickname
tn[-1]=''
(p['yaxis']).tickname=tn
I have a workaround for the overlapping labels that I incorporated in my multiplot equivalent for function graphics, which automatically suppresses these overlapping labels. The above is what I used in its setendticks method ( http://ppenteado.net/idl/pp_lib/doc/pp_multiplot__define.htm l)
If you are interested in replicating IDL's tick position algorithm, I have two in my wrapper for direct graphics' plot (created to deal with the overlapping labels issue): http://www.ppenteado.net/idl/pp_lib/doc/pp_plot.html
One is in the pp_plot_maketicks routine, the other is in pp_plot_decideintervals. I do not remember the difference between them, but the latter is supposed to be better.
Paulo
On Thursday, April 21, 2016 at 10:29:56 AM UTC-7, wlandsman wrote:
> Is there an equivalent to the direct graphics [XY]Tick_get keyword in function graphics?
>
> When displaying plots that abut on each other, the annotation on the corner of one plot can overwrite that of its neighbor. For example,
>
> p = plot(indgen(10),position=[0.1,0.525,0.95,0.95],xtickname=['' ])
> p = plot(indgen(10)+2,position=[0.1,0.1,0.95,0.525],/current)
>
> My thought was to get the Y axis values that IDL computes (and which I am happy with), and then redisplay these with the TICKVALUES property to AXIS, but omitting the offending edge value.
>
> But I first I need to retrieve that tic values that IDL computed, (or find a function that reproduces the IDL algorithm for producing tick mark positions).
>
>
> Thanks, --Wayne
|
|
|