Re: [heur] Two independent y axes ?
- To: mathgroup at smc.vnet.net
- Subject: [mg65365] Re: [heur] [mg65334] Two independent y axes ?
- From: "Jaccard Florian" <Florian.Jaccard at he-arc.ch>
- Date: Tue, 28 Mar 2006 04:05:39 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
- Thread-index: AcZRnXyTJEmV1TZ7S/i2xAfcpZ8YRwAF6z8w
Hello,
It seems difficult...
I just tried for the pleasure...
Example : sin(x) and 3cos(x) with the same range.
It is easy to adapt on other examples.
I'm sure somebody will find something better!
d1 = Plot[{Sin[x], Cos[x]}, {x, 0, 10}, PlotRange -> {{0, 10}, {-1, 1}},
PlotStyle -> {Blue, Red}, Epilog ->
{Text[StyleForm["Sin(x)", FontColor -> Blue], {2, 0.8},
Background -> White], Text[StyleForm["3 Cos(x)",
FontColor -> Red], {5.2, 0.8}, Background -> White]},
DisplayFunction -> Identity];
Show[FullGraphics[d1] /. {{GrayLevel[0.], AbsoluteThickness[0.125],
Line[{{0., b_}, {c_, d_}}]} -> {Red, AbsoluteThickness[0.125],
Line[{{10, b}, {10 + c, d}}]}, Text[a_, {b_, c_}, {1., 0.}] ->
{Text[StyleForm[3*a, FontColor -> Red], {b + 10, c}, {-1.5, 0}],
Text[StyleForm[a, FontColor -> Blue], {b, c}, {1, 0}]}},
Graphics[{Red, Line[{{10, -1}, {10, 1}}]}],
PlotRange -> {{-1.5, 12}, {-1.1, 1.1}}];
Regards
F.Jaccard
-----Message d'origine-----
De : Geico Caveman [mailto:spam at spam.invalid]
Envoyé : lundi, 27. mars 2006 13:56
À : mathgroup at smc.vnet.net
Objet : [heur] [mg65334] Two independent y axes ?
Hello,
I am trying to plot a bunch of functions and some data together. Some of the
data and some of the functions have *very* different y range from the
others. How do I create 2 independent y axes (like gnuplot - y and y2 axes)
to show the data effectively ?
And no, creating two different plots is *not* an option. So, instead of
offering that suggestion, advise if this can be done in Mathematica, and if
so, how.
Thanks.