Re: Outward tickmarks on plots [message #6267] |
Thu, 23 May 1996 00:00 |
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  |
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  |
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)
|
|
|