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

Home » Public Forums » archive » Equivalent of ytick_get() in function graphics?
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: Equivalent of ytick_get() in function graphics? [message #93078 is a reply to message #93076] Thu, 21 April 2016 11:30 Go to previous messageGo to previous message
penteado is currently offline  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
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: running script
Next Topic: Plot arrow in IDL

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

Current Time: Fri Oct 10 09:47:54 PDT 2025

Total time taken to generate the page: 1.19642 seconds