Re: Outward tickmarks on plots [message #6290 is a reply to message #6287] |
Wed, 22 May 1996 00:00  |
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)
|
|
|