Prev: Solutions provided for "combining elements
Next: if using Mathematica to solve an algebraic problem is like copying
From: Benjamin Hell on 5 Apr 2010 08:02 Hi guys, easy question this time. I want larger ticks on a plot. I know that I can use TicksStyle->Directive[Thickness[0.005], 50] to set the Thickness of the Ticks (here to 0.005) and the FontSize used for numbering the ticks (here to 50). I didn't figure out how to make the ticks longer. Thickness makes them broader, but does not influence the length. So how can I do that? Thanks in advance.
From: dh on 6 Apr 2010 07:25 On 05.04.2010 14:02, Benjamin Hell wrote: > Hi guys, > easy question this time. I want larger ticks on a plot. I know that I > can use TicksStyle->Directive[Thickness[0.005], 50] to set the Thickness > of the Ticks (here to 0.005) and the FontSize used for numbering the > ticks (here to 50). I didn't figure out how to make the ticks longer. > Thickness makes them broader, but does not influence the length. So how > can I do that? > > Thanks in advance. > Hi Benjamin, here is a silly example with ticks of different lenghts. Plot[Sin[x], {x, 0, 6}, Ticks -> {{{Pi/2, "PiHalf", 0.1}, {Pi, "Pi", 0.2}}}] Daniel -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh(a)metrohm.com> Internet:<http://www.metrohm.com>
From: David Park on 6 Apr 2010 07:26
You can use the Ticks option to hand construct the tick marks according to the notes on the Ticks help page. But this is a bit of a chore if you want both major labeled and minor unlabeled ticks. It is a bit easier with the CustomTicks command in the Presentations package. Here I double the length of the tick marks. Needs["Presentations`Master`"] xticks = CustomTicks[Identity, {0, 7, 1, 5}, CTTickSpecs -> 2 {0.0125`, 0}, CTUnLabTickSpecs -> 2 {0.0075`, 0}]; yticks = CustomTicks[Identity, {-1, 1, .5, 5}, CTTickSpecs -> 2 {0.0125`, 0}, CTUnLabTickSpecs -> 2 {0.0075`, 0}]; Plot[Sin[x], {x, 0, 2 Pi}, Ticks -> {xticks, yticks}] You can also use CustomTicks to put on any kind of tick scale that has a 1-1 mapping to the underlying plot coordinates. David Park djmpark(a)comcast.net http://home.comcast.net/~djmpark/ From: Benjamin Hell [mailto:hell(a)exoneon.de] Hi guys, easy question this time. I want larger ticks on a plot. I know that I can use TicksStyle->Directive[Thickness[0.005], 50] to set the Thickness of the Ticks (here to 0.005) and the FontSize used for numbering the ticks (here to 50). I didn't figure out how to make the ticks longer. Thickness makes them broader, but does not influence the length. So how can I do that? Thanks in advance. |