Re: Re: controlling the size of tick marks
- To: mathgroup at smc.vnet.net
- Subject: [mg27577] Re: [mg16925] Re: controlling the size of tick marks
- From: Michael Gilchrist <mag5 at duke.edu>
- Date: Wed, 7 Mar 2001 04:08:25 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I'm trying make the tick marks thicker, not just longer. I'm a rather
limited mathematica programmer, so I can't figure out how to modify the
function below to get thicker tick marks (as well as longer).
Can anyone help me out here?
Much appreciated,
Mike
On Thu, 8 Apr 1999, P. J. Hinton wrote:
>
>On 6 Apr 1999, Richard S Hsu wrote:
>
> > I tried the example you gave and got a error message.
> >
> > In[1]:= enlargeTicks[grObj_Graphics] := Module[{fulopts, tcklst},
> > fulopts = FullOptions[grObj];
> > tcklst = Ticks /. fulopts /. {loc_, lab_, len:{_, _},
> > sty:{___}} -> {loc, lab, 2*len, sty};
> > grObj /. Graphics[prims_, (opts__)?OptionQ] :>
> > Display[$Display, Graphics[prims, Ticks -> tcklst,
> > opts]]]
> >
> > In[2]:= Plot[Sin[x], {x, 0, 2Pi}, DisplayFunction -> enlargeTicks]
> > Show::gmed: No graphics output medium specified.
>
> The source of this user's problem was that I had negelected to test this
> code with a shell-based interface, where motifps would be rendering the
> PostScript rather than the notebook front end. In that case, $Display
>is
> set to not set in such a way that this method will function properly.
>
> Here is a rewrite of the code that should work with both methods.
>
> enlargeTicks[grObj:Blank[Graphics]] :=
> Module[{fulopts, tcklst}, fulopts = FullOptions[grObj];
> tcklst = Ticks /. fulopts /.
> {loc_, lab_, len:{_, _}, sty:{___}} -> {loc, lab, 2*len, sty};
> grObj /. Graphics[prims_, (opts__)?OptionQ] :>
> $DisplayFunction[Graphics[prims, Ticks -> tcklst, opts]]]
>
> --
> P.J. Hinton
> Mathematica Programming Group paulh at wolfram.com
> Wolfram Research, Inc. http://www.wolfram.com/~paulh/
> Disclaimer: Opinions expressed herein are those of the author alone.
Michael Gilchrist
Dept. of Biology
Duke University
Durham, NC 27708