Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7434 > unrolled thread

Re: remove tick labels

Started byHeike Gramberg <heike.gramberg@gmail.com>
First post2011-12-25 11:34 +0000
Last post2011-12-25 11:34 +0000
Articles 1 — 1 participant

Back to article view | Back to comp.soft-sys.math.mathematica

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: remove tick labels Heike Gramberg <heike.gramberg@gmail.com> - 2011-12-25 11:34 +0000

#7434 — Re: remove tick labels

FromHeike Gramberg <heike.gramberg@gmail.com>
Date2011-12-25 11:34 +0000
SubjectRe: remove tick labels
Message-ID<jd71o6$13e$1@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
>

[toc] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web