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

Home » Public Forums » archive » Re: Why does IDL get this wrong?
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: Why does IDL get this wrong? [message #37549 is a reply to message #37548] Fri, 02 January 2004 11:11 Go to previous messageGo to previous message
Michael Wallace is currently offline  Michael Wallace
Messages: 409
Registered: December 2003
Senior Member
Bruce Bowler wrote:
> Kindly watch for linewraps...
>
> x=[0,0,0,0,44.8,75.7,64.1,70.4,73.9,74.2,68.1,48.9,44.0,35.7 ,27.6,12.3,7.3,0]
> y=[-85,-75,-65,-55,-45,-35,-25,-15,-5,5,15,25,35,45,55,65,75 ,85]
> title='title'
> label='line1!Cline2'
> plot, x, y, yrange = [-90, 90], /ystyle, /xstyle, ytickformat = "(a1)",
> title = title, xtitle = label, xrange = [0, 100], ticklen = -0.03
>
> If ticklen is +0.03, all is fine, but setting it negative (to get the
> ticks outside the box) and the second line of the xtitle is lost.

IDL positions the axis titles relative to the axis labels. The axis
labels are positioned relative to the tick marks. When you draw the
tick marks outside the box, this causes the labels to be placed lower
than they would be if the ticks were drawn inside the box. This in turn
causes the title to be placed lower. And the second line of your title
is simply getting clipped off at the bottom of the image.

One thing you can try is playing around with the position keyword to the
plot command (or !p.position if you want the same positioning on all
plots). Essentially, you can set position such that there's more room
around the boundary of your plot. With more room, the second line of
your title will show up.

> related question (in that involves plots), is there a way to draw the box
> around the plot (the boss likes that) but *not* draw the tickmarks on the
> non-primary lines of the box?

You have to use two plot commands to achieve this effect.

Plot, FIndGen(10), TICKLEN = 0
Plot, FIndGen(10), XSTYLE = 8, YSTYLE = 8, /NOERASE, /NODATA

The first command will draw a plot without any tick marks whatsoever.
The second command will draw only the primary axes ([XY]STYLE = 8) --
this time with tick marks. The NOERASE flag makes the second plot draw
on top of the previous one instead of erasing it first. And viola!
Your primary axes have ticks and the others don't.

Mike
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: XROI & Regions_out question
Next Topic: Installing IDL 6.0 on RedHat 9 - "Segmentation fault"

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

Current Time: Tue Dec 02 21:54:46 PST 2025

Total time taken to generate the page: 3.20812 seconds