Re: graphics question
- To: mathgroup@smc.vnet.net
- Subject: [mg12354] Re: [mg12336] graphics question
- From: silvi@cinenet.net (Silvia Heubach)
- Date: Sun, 10 May 1998 02:04:35 -0400
In the book by Smith and Blachman: The Mathematica Graphics Guidebook (covering Version 2), they define a function which ensured that whatever origin you select is part of the graphis range. This is on p. 237 - 239. If you don't have access to the book, email me back and I will type in the code. I have had this problem before and remember the reference. Maybe it is available on Math source - the function is named includepoint. Silvia Heubach >Hello everyone, I have a problem with plotting a set of points and I >hope someone can help me. I first create two sets of x and y values. > >In[58]:= >xvals=Table[Random[Integer, {40,100}], {5}] > >Out[58]= >{56,66,57,66,90} > >In[59]:= >yvals=Table[Random[Integer, {40,100}], {5}] > >Out[59]= >{100,85,43,93,70} > >Then I create a list of ordered pairs from these values > >In[61]:= >points=Transpose [{xvals,yvals}] > >Out[61]= >{{56,100},{66,85},{57,43},{66,93},{90,70}} > >Now, I would like to plot these, but I want to have the origin at (0,0). >When I plot these points, since they are located quite "far" from the >origin I get a gap in the axes. > >In[62]:= >ListPlot[points, AxesOrigin->{0,0}] > >Out[62]= >Graphics > >Is there anyway to deal with that? Thank you for any help you might >provide. > >Tom