MathGroup Archive 2006

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

Search the Archive

Re: Re: Colored Tick Labels?


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}}



  • Prev by Date: Re: Re: schur decomposition and mathematica
  • Next by Date: Re: Function argument
  • Previous by thread: Re: Colored Tick Labels?
  • Next by thread: Re: Re: Re: Colored Tick Labels?