Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: ticks but no numbers on the axes

2,030 views
Skip to first unread message

David Annetts

unread,
May 12, 2012, 4:56:23 AM5/12/12
to
Hi Mirela,

Certainly. You'll need to define your own Ticks function.

Something like nultik = {#, ""}& /@ Range[your range} should work.

Regards,

Dave.

On 11/05/2012 12:13, Darau, M. wrote:
> Hello,
>
> Is it possible to have a plot with no numbers on the axes, and this while keeping the ticks? I know that "Ticks->None" in a plot, removes both ticks and tick-labels.
> Thanks!
>
> Mirela
>

djmpark

unread,
May 12, 2012, 4:56:53 AM5/12/12
to
With the CustomTicks and NoTickLabels functions in the Presentations
Application this is easy.

<< Presentations`

xticks = CustomTicks[Identity, {0, 2 \[Pi], \[Pi]/4, 4}];
yticks = CustomTicks[Identity, {-1, 1, 0.5, 5}];
Plot[Sin[x], {x, 0, 2 \[Pi]},
Frame -> True,
FrameTicks -> ({{yticks, yticks}, {xticks, xticks}} // NoTickLabels)]


David Park
djm...@comcast.net
http://home.comcast.net/~djmpark/index.html

Tomas Garza

unread,
May 12, 2012, 4:57:24 AM5/12/12
to

Plot[Sin[x], {x, -Pi, Pi},

Ticks -> {None, {{-3, ""}, {-2, ""}, {-1, ""}, {0, ""}, {1, ""}, {2, ""}, {3,

""}}}]
-Tomas

> Date: Fri, 11 May 2012 00:13:10 -0400
> From: M.D...@tue.nl
> Subject: ticks but no numbers on the axes
> To: math...@smc.vnet.net

Murray Eisenberg

unread,
May 12, 2012, 4:57:54 AM5/12/12
to
You could exploit the form of Ticks where you give for each tick a
position and a label, but just make the label a null string:

tix = Thread[{#, ""} &[0.1 Range[10]]]
Plot[x^2, {x, 0, 1}, Ticks -> {tix, tix}]

On 5/11/12 12:13 AM, Darau, M. wrote:
> Hello,
>
> Is it possible to have a plot with no numbers on the axes, and this while keeping the ticks? I know that "Ticks->None" in a plot, removes both ticks and tick-labels.
> Thanks!
>
> Mirela
>

--
Murray Eisenberg mur...@math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower phone 413 549-1020 (H)
University of Massachusetts 413 545-2859 (W)
710 North Pleasant Street fax 413 545-1801
Amherst, MA 01003-9305

Bob Hanlon

unread,
May 12, 2012, 5:00:27 AM5/12/12
to
Show[plt=Plot[x, {x, 0, 1}],
Ticks->((Ticks/.AbsoluteOptions[plt,Ticks])/.
{z_?NumericQ, _, r__} -> {z, "", r})]


Bob Hanlon

Sent from my iPhone

On May 11, 2012, at 12:13 AM, "Darau, M." <M.D...@tue.nl> wrote:

> Hello,
>
> Is it possible to have a plot with no numbers on the axes, and this while k=
eeping the ticks? I know that "Ticks->None" in a plot, removes both ticks an=
d tick-labels.
> Thanks!
>
> Mirela
>

0 new messages