Re: Re: Colored Tick Labels?
- To: mathgroup at smc.vnet.net
- Subject: [mg66978] Re: [mg66928] Re: Colored Tick Labels?
- From: Gianluca Gorni <gorni at dimi.uniud.it>
- Date: Tue, 6 Jun 2006 06:27:06 -0400 (EDT)
- References: <e5reku$h2e$1@smc.vnet.net> <200606040510.BAA13037@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Unfortunately it seems that AbsoluteOptions[] applies N[]
to all its output. Tick labels that were not floating-point
numbers will get corrupted.
For example try with
AbsoluteOptions[Plot[Sin[x], {x, 0, Pi}, Ticks -> {{E}, {1/2}}], Ticks]
Any exact numeral in PlotLabel will be affected too.
I sent a report to wri about this in 2003.
Gianluca Gorni
On 4 giu 2006, at 07:10, bghiggins at ucdavis.edu wrote:
> Not sure I have a complete answer, but here are some possibilities to
> examine:
>
> Suppose you have the following plot
>
> plt = Plot[Sin[x], {x, -1, 1}]
>
> You can extract the Ticks from this plot using AbsoluteOptions and
> then
> modify them. In the following example I make the x tick values Blue
> and
> the y tick values Red
>
> myTicks = {(Ticks /. AbsoluteOptions[plt,
> Ticks])[[1]] /. {x_Real, y_Real, z__} -> {x, StyleForm[y,
> FontColor -> Blue], z}, (Ticks /. AbsoluteOptions[plt,
> Ticks])[[
> 2]] /. {x_Real, y_Real, z__} -> {x,
> StyleForm[y, FontColor -> Red], z}}
- Follow-Ups:
- Re: Re: Re: Colored Tick Labels?
- From: Bruce Miller <brucem@wolfram.com>
- Re: Re: Re: Colored Tick Labels?
- References:
- Re: Colored Tick Labels?
- From: bghiggins@ucdavis.edu
- Re: Colored Tick Labels?