Re: Re: Advanced plotting
- To: mathgroup at smc.vnet.net
- Subject: [mg98909] Re: [mg91991] Re: Advanced plotting
- From: Li Zhengji <zhengji.li at gmail.com>
- Date: Tue, 21 Apr 2009 05:11:29 -0400 (EDT)
- References: <gal3jl$e1b$1@smc.vnet.net> <200809162323.TAA24562@smc.vnet.net>
Inspired by Bill Rowe's code, I think we can do it like this.
The key point here is that the common Y axes is in a separated Inset object.
Plot[-3, {x, -0.5, 10}, PlotRange -> {-1.1, 1.1}, Axes -> None,
AspectRatio -> Automatic,
Epilog -> {Inset[
Plot[-3, {x, 0, 10}, PlotRange -> {-1.1, 1.1},
Axes -> {False, True}, Frame -> None,
AspectRatio -> Automatic], {0, 0}, {0, 0}, 10],
Inset[Plot[Sin[2 x], {x, 0, 4}, PlotRange -> {-1.1, 1.1},
Axes -> {True, False}, Frame -> None,
AspectRatio -> Automatic], {0, 0}, {0, 0}, 4],
Inset[Plot[Cos[2 x], {x, 6, 10}, PlotRange -> {-1.1, 1.1},
Axes -> {True, False}, Frame -> None,
AspectRatio -> Automatic], {5.2, 0}, {6, 0}, 4],
Inset[Style[Rotate["\[TildeTilde]", 90 Degree],
FontSize -> 20], {4.6, 0}]}]
--
Li Zhengji
-------------------------------------------------------------
If all you have is a hammer, everything is a nail.
-------------------------------------------------------------