RE: How to show tick labels w/o showi the tick marks?
- To: mathgroup at smc.vnet.net
- Subject: [mg90472] RE: [mg90418] How to show tick labels w/o showi the tick marks?
- From: "David Annetts" <davidannetts at aapt.net.au>
- Date: Thu, 10 Jul 2008 06:36:22 -0400 (EDT)
- References: <200807090851.EAA06844@smc.vnet.net>
Hi Aaron,
> I guess my subject says it all.
> I can hide the ticks themselves my making them transparent,
> but that also makes the labels disappear. How to fix this?
You need to look at the variations of Ticks[].
Given the plot
plt = Plot[Sin[\[Pi] x] , {x, -\[Pi], \[Pi]}]
we can make it look a little better after defining the ticks using
ptik = {#, #} & /@ Range[-\[Pi], \[Pi], \[Pi]/2]; (* Pi scale *)
vtik = {#, #} & /@ Range[-1, 1, 1]; (*
visible *)
itik = {#, "", 0} & /@ Range[-1, 1, .1]; (* length = 0 =>
invisible *)
ytik = Join[vtik, itik];
and use them
plt = Plot[Sin[\[Pi] x] , {x, -\[Pi], \[Pi]},
FrameTicks -> {{ytik, None}, {ptik, None}}]
You could also play with style for particular ticks.
Regards,
Dave.
- References:
- How to show tick labels w/o showi the tick marks?
- From: Aaron Fude <aaronfude@gmail.com>
- How to show tick labels w/o showi the tick marks?