Re: Also force AxesOrigin to be in the lower right corner?
- To: mathgroup at smc.vnet.net
- Subject: [mg64593] Re: [mg64563] Also force AxesOrigin to be in the lower right corner?
- From: "David Park" <djmp at earthlink.net>
- Date: Thu, 23 Feb 2006 00:34:57 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Jason, Right, we don't want the axes cutting through the middle of the data! The easiest method is to use a two-sided Frame. dataset = Table[{x, x/2 + Sin[x]}, {x, -5, 5, 0.2}]; ListPlot[dataset, Frame -> {True, True, False, False}, Axes -> None, Prolog -> {AbsolutePointSize[3]}, ImageSize -> 450]; Or with DrawGraphics this could be done more simplt as Needs["DrawGraphics`DrawingMaster`"] Draw2D[ {AbsolutePointSize[3], Point /@ dataset}, Frame -> {True, True, False, False}, ImageSize -> 450]; David Park djmp at earthlink.net http://home.earthlink.net/~djmp/ From: Jason Quinn [mailto:jason.lee.quinn at gmail.com] To: mathgroup at smc.vnet.net I want to force the x-axis to lie on the bottom of the graph regardless of a specific dataset. What's the best way to do this? I've been trying plotting the dataset and grabbing the lower-right corner of the plotrange with AbsoluteOptions. This works but seems absurdly complicated and I feel like I'm missing the forest for the trees. Is there a better way than this: firstplot = ListPlot[dataset, DisplayFunction -> Identity]; ListPlot[dataset, AxesLabel -> {"x", "y"}, AxesOrigin -> {AbsoluteOptions[firstplot, PlotRange][[1, 2, 1, 1]], AbsoluteOptions[firstplot, PlotRange][[1, 2, 2, 1]]}, DisplayFunction -> $DisplayFunction]; Jason