MathGroup Archive 2012

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

Search the Archive

Re: Plotting: how does one reverse the time axis tick mark values?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg127352] Re: Plotting: how does one reverse the time axis tick mark values?
  • From: Bob Hanlon <hanlonr357 at gmail.com>
  • Date: Thu, 19 Jul 2012 03:52:40 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: mathgroup-newout@smc.vnet.net
  • Delivered-to: mathgroup-newsend@smc.vnet.net
  • References: <20120718053631.A933A6828@smc.vnet.net>

Show[plt = ListPlot[
   Transpose[{Range[6], Range[6]}]],
 Ticks -> {
   (Ticks /. AbsoluteOptions[plt, Ticks])[[1]] /.
    {x_, lbl_?NumericQ, r__} ->
     {x, 6 - lbl, r},
   Automatic}]


Bob Hanlon


On Wed, Jul 18, 2012 at 1:36 AM, James Stein <james at stein.org> wrote:
> I thought this would be simple, but I am stumped: I wish to display
> values (on the y axis) for specific times (on the x-axis).
> Conventionally, time on charts progresses from left to right, and this
> is my desire. However, I want the ticks along the time axis to be
> measured in what one might call "countDown units" or "reverse units",
> for example "Myr before Present" or "Seconds before Midnight" or
> "Centuries B.C.".
>
> As a simple example, consider the result of
>      ListPlot [ Transpose [ { Range [ 6 ] , Range [ 6 ] } ] ]
> which displays the values 2, 3, 4, 5, 6 along the x axis.
> My problem is how to construct this same chart, except with values 4,
> 3, 2, 1, 0  replacing 2, 3, 4, 5, 6.
> The various ways I tried to do this also mirror-reflect the plotted y-values.
> I looked for an option called something akin to
> 'TickMarkLabelFunction', but couldn't find one.
>



  • Prev by Date: No CCompiler found - MinGW-x64
  • Next by Date: Re: Evaluate code fragment without making new cell for it?
  • Previous by thread: Re: Plotting: how does one reverse the time axis tick
  • Next by thread: Re: Plotting: how does one reverse the time axis tick mark values?