Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Drawing tick labels without ticks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80598] Re: Drawing tick labels without ticks
  • From: "David Park" <djmpark at comcast.net>
  • Date: Sun, 26 Aug 2007 23:09:36 -0400 (EDT)
  • References: <far9qs$4bp$1@smc.vnet.net>

Two suggestions:

This gives you zero length tick marks, but there is a residual dot.

xyticks = Table[{x, x, {0, 0}}, {x, 1, 5}];
ListPlot[{1, 2, 3, 4, 5},
 AxesStyle -> Opacity[0],
 TicksStyle -> Opacity[1],
 Ticks -> {xyticks, xyticks},
 PlotRange -> {{0, 5.1}, {0, 5.1}}]

The following gets rid of all ticks and axes and just adds labels where you 
want them.

Graphics[
 {Point /@ Table[{x, x}, {x, 1, 5}],
  Table[Text[x, {x, 0.8}], {x, 1, 5}],
  Table[Text[x, {0.8, x}], {x, 1, 5}]}]


-- 
David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/


"D. Grady" <D.C.Grady at gmail.com> wrote in message 
news:far9qs$4bp$1 at smc.vnet.net...
> Can anyone suggest a simple method for keeping tick labels in a graph
> without also drawing axes or the ticks themselves?  As an example,
>
> ListPlot[{1, 2, 3, 4, 5}, AxesStyle -> Opacity[0], TicksStyle ->
> Opacity[1]]
>
> comes close to what I'm after, but doesn't quite get there.  I'd like
> for nothing to appear in the plot except the data points and the tick
> labels.
>
> There doesn't seem to be a way to target specifically the tick labels
> without also afftecting the tick marks or the axes.  LabelStyle will
> target tick labels, but it has a lower precedence than both AxesStyle
> and TickStyle, so if I use either of those options to turn off the
> axes and ticks, it will also turn off labels.
>
> It's my hope that there is a simple solution that I'm overlooking.  If
> the only way around this is to go through a complicated process of
> extracting tick labels from a dummy graphic and then pasting them in
> to the actual graphic, I may as well use a different program.  Thanks
> for your help!
>
> 



  • Prev by Date: Re: BarChart inside a Frame. How to remove Labels from the top of
  • Next by Date: Re: BarChart inside a Frame. How to remove Labels from
  • Previous by thread: Re: Drawing tick labels without ticks
  • Next by thread: Re: Drawing tick labels without ticks