Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #10983

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

From E. Martín-Serrano <eMartinSerrano@telefonica.net>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Plotting: how does one reverse the time axis tick mark values?
Date 2012-07-19 07:50 +0000
Message-ID <ju8e7b$98c$1@smc.vnet.net> (permalink)
Organization Time-Warner Telecom

Show all headers | View raw


Something like this below will do the trick, producing forward and backward
scales over any range and the corresponding ticks.

I am forwarding James a picture with multiple bidirectional scales over
multiple magnitudes on the same x-y axes.

<<Presentations

Draw2D[
 {Blue,
  XTickLine[{0, 1, 1}, {-Rescale[2.5, {5, 0}],
    0}, {-Rescale[2.5, {5, 0}], 0, .1}, 5,
   XNumberFunction -> (NumberForm[#, {4, 1}] &),
   XLabTickSpecs -> {0.015, 0, {AbsoluteThickness[2], Black}},
   XUnLabTickSpecs -> {0.015, 0, {Gray}},
   XTextSpecs -> {{0, 1}, {1, 0}, 0.01}],
  Purple,
  XTickLine[{0, 1, .8}, {Rescale[2.5, {5, 0}],
    0}, {Rescale[2.5, {5, 0}], 0, -.1}, 5,
   XNumberFunction -> (NumberForm[#, {4, 1}] &),
   XLabTickSpecs -> {0.015, 0, {AbsoluteThickness[2], Black}},
   XUnLabTickSpecs -> {0.015, 0, {Gray}},
   XTextSpecs -> {{0, 1}, {1, 0}, 0.01}]
  },
 PlotRange -> {{-.3, 1.2}, {-.5, 1.1}},
 BaseStyle -> {FontSize -> 12},
 Frame -> False,
 ImageSize -> 500]

E. Martin-Serrano

-----Mensaje original-----
De: James Stein [mailto:james@stein.org]
Enviado el: mi=E9rcoles, 18 de julio de 2012 7:37
Para: mathgroup@smc.vnet.net
Asunto: Plotting: how does one reverse the time axis tick mark
values?

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.

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Plotting: how does one reverse the time axis tick mark values? E. Martín-Serrano <eMartinSerrano@telefonica.net> - 2012-07-19 07:50 +0000

csiph-web