Re: tickmark problem

*To*: mathgroup at smc.vnet.net*Subject*: [mg30415] Re: [mg30393] tickmark problem*From*: BobHanlon at aol.com*Date*: Fri, 17 Aug 2001 03:09:54 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

In a message dated 2001/8/15 1:16:57 AM, bernd at bio.vu.nl writes: >I am having some difficulties with the TickMarks. For a publishable >graph, a set tickmarks and use a frame. >However Mathematica sometimes changes the major ticks marks to the >length of the minor ticks. Then i thought to set the lenghts >explicitly, but the following puzzles me (tickmark position are a bit >strange but they illustrate the problem). > >p = Plot[t t , {t, 0, tend}, Frame -> True, PlotRange -> {0, 11}, > FrameTicks -> {Range[0, 10, 2], {0.001, 0.01, 0.1, 1, 10}, None, None} >] > >p = Plot[t t , {t, 0, tend}, Frame -> True, PlotRange -> {0, 11}, > FrameTicks -> {Range[0, 10, 2], {0.01, 0.1, 1, 10}, None, None} ] > >FrameTicks /. AbsoluteOptions[p] > >gives for all tickmarks {0.00625, 0.} as length specification for both >graphs. However, you can clearly see the tickmarks length decrease >when FrameTicks includes 0.001. > FrameTicks -> {Range[0, 10, 2], {0.001, 0.01, 0.1, 1, 10}, None, None} > > instead of > FrameTicks -> {Range[0, 10, 2], {0.01, 0.1, 1, 10}, None, None} > >How can i make sure the tickmarks ALWAYS have the same length >regardless of PlotRange and tickmark positions? >And why does Mathematica give the same tickmark lengths when we can cleary >see the lengths on the hor. axis change? > You have specified tick locations without specifying the tick lengths so the default length is used. p = Plot[x, {x, 0, 10}, Frame -> True]; A major tick specification looks like (FrameTicks /. AbsoluteOptions[p])[[1,1]] {0., 0., {0.00625, 0.}, {GrayLevel[0.], AbsoluteThickness[0.25]}} A minor tick specification looks like (FrameTicks /. AbsoluteOptions[p])[[1,8]] {1., "", {0.00375, 0.}, {GrayLevel[0.], AbsoluteThickness[0.125]}} majorTicks = Table[{x, x, {0.00625, 0.}, {GrayLevel[0.], AbsoluteThickness[0.25]}}, {x, 0, 10, 3}]; minorTicks = Table[{x, "", {0.00375, 0.}, {GrayLevel[0.], AbsoluteThickness[0.125]}}, {x, 0, 10, 1/2}]; p = Plot[x, {x, 0, 10}, Frame \[Rule] True, FrameTicks -> { Join[majorTicks, minorTicks], Automatic, None, None}]; Bob Hanlon Chantilly, VA USA