[Matplotlib-users] Rounding issue when plotting From: David Koch - 2007-04-23 14:15 Attachments: Message as HTML ```Hi, I have a "normalized" bunch of co-ordinates with x and y between 0 and 1 - I have to multiply the values by 100 in order to get the curve I expected to see, otherwise I don't get anything. What's going on? I did: pylab.plot(xCoord, yCoord) pylab.show() ... no extra stuff Thank you, David ```
 Re: [Matplotlib-users] Rounding issue when plotting From: Christopher Barker - 2007-04-23 16:25 ```David Koch wrote: > I have a "normalized" bunch of co-ordinates with x and y between 0 and 1 > - I have to multiply the values by 100 in order to get the curve I > expected to see, otherwise I don't get anything. What's going on? > > I did: > > pylab.plot(xCoord, yCoord) > pylab.show() we're going to need more info to help -- perhaps a complete script, and/or what values xCoord and yCoord have in them. In the meantime -- did you inadvertently use integer arrays? -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@... ```
 Re: [Matplotlib-users] Rounding issue when plotting From: Christopher Barker - 2007-04-23 17:40 ```it works fine for me with this change: def plotRocCurve(xCoord, yCoord): # TODO: solve rounding issues here #lines = pylab.plot(xCoord * 100, yCoord * 100, markersize = 2, linewidth = 0.5) lines = pylab.plot(xCoord, yCoord, markersize = 2, linewidth = 0.5) pylab.xlabel('False positives', fontsize = 10) pylab.ylabel('True positives', fontsize = 10) # pylab.axis([0.0, 1.0, 0.0, 1.0]) pylab.show() I get values between 0.0 and 1.0 I'm running OS-X 10.4 Python2.5 >>> numpy.__version__ '1.0.2' >>> matplotlib.__version__ '0.90.0' -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception Chris.Barker@... ```
 Re: [Matplotlib-users] Rounding issue when plotting From: David Koch - 2007-04-24 07:12 Attachments: Message as HTML ```Mhm, thank you for testing - it doesn't work here unless I scale everthing. Bug? Linux, >>> numpy.__version__ '1.0.1' >>> matplotlib.__version__ '0.87.3' ```