MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: remove tick labels

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123863] Re: remove tick labels
  • From: Heike Gramberg <heike.gramberg at gmail.com>
  • Date: Sun, 25 Dec 2011 06:33:29 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201112241209.HAA13633@smc.vnet.net>

The easiest way is probably to set LabelStyle->Opacity[0]. This doesn't remove the tick marks but merely hides them by setting their opacity to 0.  Since TicksStyle overrides LabelStyle, to
create a plot where only the tick marks along say the x-axes are hidden, you could do something
like

Plot[Sin[x], {x, 0, 2 Pi}, TicksStyle -> {Automatic, Opacity[1]}, LabelStyle -> Opacity[0]]

Note that setting LabelStyle affects all labels such as AxesLabel so you would need to use something like Style[label, Opacity[1]] to override the zero opacity set by LabelStyle, i.e.
Plot[Sin[x], {x, 0, 2 Pi}, LabelStyle -> Opacity[0], AxesLabel -> Map[Style[#, Opacity[1]] &, {x, Sin[x]}]]

Heike.

On 24 Dec 2011, at 13:09, markus wrote:

> Hi,
>
> is there a simple way in Mathematica to remove the tick labels from a
> plot while keeping the tick marks?
> I know that in principle one could specify all the tick mark
> positions, formatting and labels in a list as an argument to the plot
> function, but this is quite cumbersome. What I want is to let
> Mathematica create all the ticks automatically and the remove just the
> labels afterwards. I thought it should be possible by manipulating the
> output of the plot command in some way, but I haven't found out yet.
>
> Regards,
> Markus
>




  • Prev by Date: Re: remove tick labels
  • Next by Date: Re: Why does Manipulate leak global symbols? (Potential bug here?)
  • Previous by thread: Re: remove tick labels
  • Next by thread: Re: remove tick labels