Re: Plotting Points
- To: mathgroup at smc.vnet.net
- Subject: [mg16680] Re: Plotting Points
- From: "Allan Hayes" <hay at haystack.demon.co.uk>
- Date: Sat, 20 Mar 1999 02:08:56 -0500
- References: <7ct1l3$828@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Ed McBride wrote in message <7ct1l3$828 at smc.vnet.net>... >I have a bunch of points I want to plot, and am using ListPlot. I'm >willing to let Mathematica determine where the axes cross, but I need >the x and y scales to be the same, so that distances on the plot are >relatively correct. Is there a way to force Mathematica to make both >scales the same? Thanks, >Ed McBride, P.E. > Ed, With data = Table[Random[Integer,{2,9}],{10},{2}] Get axes scales the same by using AspectRatio -> Automatic: gr = ListPlot[data, AspectRatio->Automatic, PlotRange-> All, PlotStyle->PointSize[.02] ] The following puts the axes origin for where we want for anyl Graphics objects. (from my column How and Why?, Mathematica in Education and Research, Volume 7, No 4, Fall, 1998) AxesAndOrigin[gr_, origin_]:= Show[gr, AxesOrigin ->origin, PlotRange-> (Through[{Min,Max}[#]]&/@Transpose[{PlotRange[gr],origin}]) ] Check: AxesAndOrigin[gr,{0,0}] Allan --------------------- Allan Hayes Mathematica Training and Consulting Leicester UK www.haystack.demon.co.uk hay at haystack.demon.co.uk Voice: +44 (0)116 271 4198 Fax: +44 (0)870 164 0565