Re: Axis in two scales
- To: mathgroup at smc.vnet.net
- Subject: [mg92591] Re: [mg92569] Axis in two scales
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Tue, 7 Oct 2008 07:05:25 -0400 (EDT)
- Reply-to: hanlonr at cox.net
t = Table[{x, If[x < .5, Sin[100*x], Sin[x]]}, {x, 0, 5, 0.001}]; t1 = Select[t, First[#] < 0.5 &]; t2 = Complement[t, t1]; Grid[{{ ListLinePlot[t1, ImageSize -> 250, Axes -> {True, False}, Frame -> {True, True, True, False}, PlotRange -> {{-0.01, 0.5}, {-1.05, 1.05}}, PlotStyle -> Blue], ListLinePlot[t2, ImageSize -> 220, Axes -> {True, False}, Frame -> {True, False, True, True}, PlotRange -> {{0.5, 5.1}, {-1.05, 1.05}}, PlotStyle -> Directive[Thick, Magenta]]}}, Spacings -> -0.25] Bob Hanlon ---- Nacho <ncc1701zzz at gmail.com> wrote: ============= Hello everyone. I have a dataset in pairs (x,y) that I would like to plot. The main problem is that the data set has interesting parts in the beginning that I would like to view clearly. As an example, create the following table: t = Table[{x, If[x < .5, Sin[100*x], Sin[x]]}, {x, 0, 5, 0.001}]; ListPlot[t] You have a very detailed sine in the beginnng and the rest is less interesting. I would like to "split" the X axis in two, so the left half of the plot covers x={0,0.5} and the second half x={0.5,5}] in the same plot and with the right ticks. It is like a piecewise axis... is it possible? Thanks. -- Bob Hanlon