Re: Plot backwards
- To: mathgroup at smc.vnet.net
- Subject: [mg40802] Re: Plot backwards
- From: "Peltio" <peltio at twilight.zone>
- Date: Thu, 17 Apr 2003 23:18:45 -0400 (EDT)
- Organization: Peltio Inc.
- References: <b7llvq$r1k$1@smc.vnet.net>
- Reply-to: "Peltio" <peltioNOSP at Miname.com.invalid>
- Sender: owner-wri-mathgroup at wolfram.com
"Andrzej Kozlowski" wrote
>g = Plot[x^3, {x, -10, 10}, Ticks -> {Table[{n, n}, {n, 0, 10}],
>Automatic}];
>g = Plot[x^3, {x, -10, 10}, DisplayFunction -> Identity,
> Ticks -> {Table[{n, n}, {n, 0, 10}], Automatic}];
>h = g /. {(x_)?NumberQ, (y_)?NumberQ} :> {-x, y};
>Show[h, DisplayFunction -> $DisplayFunction]
Just to add my two cents (I add it here since I can't see the original
poster's reply).
Plotting f[-x] and placing the ticks' tags for n at -n can spare the
conversion of every point of the graph:
f[x_]:=x^3;
Plot[ f[-x], {x, -10, 10},
Ticks -> {Table[{-n, n}, {n, 0, 10}], Automatic}
];
Of course this works only if the ticks are to be supplied directly.
Andrzej's method is more general since the conversion includes every part of
the graph.
Best regards,
Peltio