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

Home » Public Forums » archive » Re: Variable Tick Scaling
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: Variable Tick Scaling [message #12699] Tue, 01 September 1998 00:00
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
James,


how about the following? It is independent of the actual range of
your data and should be adapted easily enough if you want to have minor
tickmarks change, say, 1/4 through the way. The routine has one little
glitch in that the label at half way is written as if the axis would
stop there, i.e. a little too low. You could circumvent this by issuing
another axis call with no minor tick marks at all (or you could plot the
axis with minor=1 in the plot command).

Hope this helps,
Martin.



--
------------------------------------------------------------ -------
Dr. Martin Schultz
Department for Earth&Planetary Sciences, Harvard University
109 Pierce Hall, 29 Oxford St., Cambridge, MA-02138, USA

phone: (617)-496-8318
fax : (617)-495-4551

e-mail: mgs@io.harvard.edu
Internet-homepage: http://www-as.harvard.edu/people/staff/mgs/
------------------------------------------------------------ -------



pro minor

x=findgen(20)
y=10.*exp(-x/10.)

plot,x,y,yrange=[0,10],ystyle=5

half = 0.5*total(!y.crange) ; get half of data range
whalf = 0.5*total(!y.window) ; get half size of plot window
wsave = !y.window ; save plot window size

; draw bottom half of axis
!y.window[1] = whalf
axis,!x.crange[0],YAXIS=0,yrange=[!y.crange[0],half], $
ystyle=1,yminor=10
axis,!x.crange[1],YAXIS=1,yrange=[!y.crange[0],half], $
ystyle=1,yminor=10, $
ytickname=replicate(' ',30)
!y.window = wsave

; draw top half of axis
!y.window[0] = whalf
axis,!x.crange[0],YAXIS=0,yrange=[half,!y.crange[1]], $
ystyle=1,yminor=3,ytickname=' '
axis,!x.crange[1],YAXIS=1,yrange=[half,!y.crange[1]], $
ystyle=1,yminor=3, $
ytickname=replicate(' ',30)
!y.window = wsave

return
end
  • Attachment: minor.pro
    (Size: 0.86KB, Downloaded 73 times)
[Message index]
 
Read Message
Previous Topic: row calculation in a 2D array
Next Topic: Variable Tick Scaling

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

Current Time: Fri Oct 10 08:14:14 PDT 2025

Total time taken to generate the page: 0.56127 seconds