Re: Problem with supplying custom tick marks
- To: mathgroup at smc.vnet.net
- Subject: [mg82922] Re: Problem with supplying custom tick marks
- From: Thomas E Burton <tburton at brahea.com>
- Date: Sat, 3 Nov 2007 03:29:38 -0500 (EST)
The help for Ticks in Version 6 (same behavior in v5) says in part "Tick mark lengths are given as a fraction of the distance across the whole plot." Hence, the ratio of x-tick lengths to y-tick lengths will be in proportion to AspectRatio. The x-ticks seem therefore to be foreshortened by the default aspect ratio of 1/GoldRatio. It is thus no surprise that your x-ticks looks short. A quick and dirty correction is xticks1 = xticks /. {l_Real, 0} :> {l/ar, 0} Block[{ar = 1/2}, Plot[5*Sin[x], {x, 0, 15}, Frame -> True, FrameTicks -> {xticks1, Automatic, None, None}, AspectRatio -> ar] ] which looks good to me at all aspect ratios I tried, above and below 1. Apparently, the default option Automatic adjusts for aspect ratio. I am surprised that this adjustment is not reflected in the result of AbsoluteOptions. I am also surprised that the problem you cite seems to be confined to aspect ratios below 1. To my eye, using xticks with AspectRatio->3 looks OK. Perhaps it's an optical illusion. Tom David Park had written: > Here are a set of tick specifications for an x axis: ... What > bothers me is that the x-ticks are so much shorter in the second > plot (at least they distinctly look that way to me) even though > they are exactly the same ticks. ...