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

Home » Public Forums » archive » Re: Some questions about "axis"
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Some questions about "axis" [message #62514] Thu, 11 September 2008 06:24
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
ICBM0926 writes:

> I am now currently using "TVSCL" to plot colored contour pictures. In
> my program, I've used "plot"+ "TVScl"+ "axis" to complete the entire
> colored contour. Especially I've used two "axis" procedure to make the
> axis labels and axis ticks stand outside the colored contour. The
> following address contains a completed plot.
>
> http://picasaweb.google.com/ICBM0926/oQPOXH?authkey=l5370hFd Wig#5244685059173580738
>
> In the picture one can find that the ticks are too close to the
> labels, they almost stick together. I've tried to adjust the
> "ticklen". However, I can't shorten them any more or the ticks are
> almost invisible. I need some ways to move tick labels outward. Is
> there any way to solve this issue? Partial code are attached below.

I always think of Kermit the frog in these kinds of
situations, singing "It's not easy to be green.", although
I always substitute "anal" for "green". The good folks at
ITTVIS, as nice as they are, have never been known for having
a refined aesthetic sense about how things look.

The spacing of axis labels has driven me crazy more than once,
and was one of the reasons I thought seriously about giving
up object graphics early on, since the Y axis labels were
*NEVER* spaced properly. (A fact, I was convinced, even a
non-anal person could see clearly.)

But, I have to say, things have gotten better over the
years, and in the process of doing a bit of research this
morning, I have to admit I don't really have too many
complaints about how axis labels are spaced in my IDL 7
installation. Both on the screen and in a PostScript file,
I think ITTVIS is calculating things correctly.

Still, there are times when it would be helpful to move
things a little bit. Here is an example program that shows
how I would move the YAXIS values a bit further to the right.
I've probably overdone it a bit, but I wanted you to see the
effect without squinting. The "normal" plot is on the left,
and the manipulated plot is on the right.

Cheers,

David

;*********************************************************** *****
window, xsize=800, ysize=400
data = Findgen(101)

; Normal plot.
PLOT, data, YSTYLE=8, position=[0.1, 0.1, 0.4, 0.9]
AXIS, YAXIS=1, /SAVE, YTICKLEN=-0.075, YRANGE=[-300, 0]

; Manipulated plot.
PLOT, data, YSTYLE=8, position=[0.55, 0.1, 0.85, 0.9], /NoErase
AXIS, YAXIS=1, /SAVE, YTICKLEN=-0.075, YTICK_GET=ticks, $
YTICKFORMAT='(A1)', YRANGE=[-300,0]
c = Convert_Coord(Findgen(N_Elements(ticks)), ticks, $
/DATA, /TO_NORMAL)
nticks = c[1,*]
FOR j=0,N_Elements(nticks)-1 DO XYOUTS, 0.89, nticks[j]-0.01, $
/NORMAL, String(ticks[j], Format='(I0)'), Alignment=0.0

END

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: write_tiff integer format
Next Topic: Re: IDL is not accurate enough!

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

Current Time: Thu Oct 09 20:02:58 PDT 2025

Total time taken to generate the page: 1.28132 seconds