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

Home » Public Forums » archive » Re: Outward tickmarks on plots
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: Outward tickmarks on plots [message #6267] Thu, 23 May 1996 00:00
hahn is currently offline  hahn
Messages: 108
Registered: November 1993
Senior Member
offenbrg@fondue.gsfc.nasa.gov (Joel D. Offenberg) wrote:

> plot,ticklen=1,... ;real plot
> plot,ticklen=-.05, xtickformat=tickform, ytickformat=tickform, noeras=1.....

If I understood the online help well you had to write enclose the
function name in quotes:

plot,ticklen=-.05, xtickformat='tickform', ytickformat='tickform',
noeras=1.....
> Good luck!

Norbert
> Joel
> --
> "...And I am unanimous in this" - Mrs. Slocumbe
> ------------------------------------------------------------ ----------
> | Joel D Offenberg | offenbrg@fondue.gsfc.nasa.gov |
> | Hughes STX, NASA/GSFC/LASP | UIT Sci team & COBE Unix SysAdm |
Re: Outward tickmarks on plots [message #6287 is a reply to message #6267] Wed, 22 May 1996 00:00 Go to previous message
offenbrg is currently offline  offenbrg
Messages: 31
Registered: August 1993
Member
bleau@umdsp.umd.edu (Lawrence Bleau) writes:

> Does anyone know how to resolve this dilemma? I would like a grid displayed
> with the minor tickmarks outside the graph, and the TICKLEN keyword doesn't
> seem to be able to handle this combination. Any ideas?

> Btw, I tried using PLOT with a negative TICKLEN and /NODATA, then OPLOT with a
> TICKLEN of 1.0. This gave me tickmarks inside and outside as well as the grid,
> but the axis labels were written twice *in different places*. It looks ugly,
> folks. Is there any hope in this approach, or should I give it up? Thanks.

I think you're almost there....all you need to do is turn off the axis
labels. There are several ways to do this...the easiest is probably use the
[xyz]tickformat keyword to specify a null print format for the ticks.

For instance,
.run
- function tickform,axis,index,value
- return,''
- end

plot,ticklen=1,... ;real plot
plot,ticklen=-.05, xtickformat=tickform, ytickformat=tickform, noeras=1.....

Good luck!
Joel
--
"...And I am unanimous in this" - Mrs. Slocumbe
------------------------------------------------------------ ----------
| Joel D Offenberg | offenbrg@fondue.gsfc.nasa.gov |
| Hughes STX, NASA/GSFC/LASP | UIT Sci team & COBE Unix SysAdm |
Re: Outward tickmarks on plots [message #6290 is a reply to message #6287] Wed, 22 May 1996 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <4ntg6k$nqs@hecate.umd.edu>, bleau@umdsp.umd.edu (Lawrence Bleau) writes:
> Hello, there. I'm using PLOT (and OPLOT) to create a (what else?) plot of some
> data. I'm using TICKLEN = 1.0 to have a grid displayed. The grid comes up on
> the major ticks okay, but IDL draws the minor ticks pointing inward. What I'd
> like to do is have a grid with the minor tickmarks *outside* the graph. The
> PLOT parameter TICKLEN, when negative, draws the ticks (minor and major)
> outside the graph, but doing this also turns off the grid!
>
> Does anyone know how to resolve this dilemma? I would like a grid displayed
> with the minor tickmarks outside the graph, and the TICKLEN keyword doesn't
> seem to be able to handle this combination. Any ideas?
>
> Btw, I tried using PLOT with a negative TICKLEN and /NODATA, then OPLOT with a
> TICKLEN of 1.0. This gave me tickmarks inside and outside as well as the grid,
> but the axis labels were written twice *in different places*. It looks ugly,
> folks. Is there any hope in this approach, or should I give it up? Thanks.

This does almost what you want. It avoids the problems of labels written twice
and minor ticks appearing both inside and outside the plot. The major ticks
do also appear outside the box.

data = findgen(100)
plot, data, xticklen=-.05, yticklen=-.05
plot, data, /nodata, /noerase, xticklen=1, yticklen=1, xminor=1, yminor=1, $
xtickname=make_array(30, /string, value=" "), $
ytickname=make_array(30, /string, value=" ")
end


____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Memory allocation problem using Call_external
Next Topic: call_external for Absoft FORTRAN on the Mac

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

Current Time: Wed Oct 08 15:39:43 PDT 2025

Total time taken to generate the page: 0.00531 seconds