[matplotlib-devel] Bug in xlim or savefig or hist?

2009-02-18 Thread Olle Engdegård


Doing

from pylab import *
x=normal(10, size=1000)
hist(x)
xlim(0,10)
savefig("Image.svg")

and then importing the file to Inkscape and saving it there as a pdf gives 
the attached result. The stuff right of x=10 is suddenly there. The 
weirdest thing is that Inkscape _does not see this overspill_!


Not sure what is happening here, cannot reproduce it with plot() instead 
of hist().


Cheers,
Olle

Image.pdf
Description: Adobe PDF document
--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Bug in xlim or savefig or hist?

2009-02-18 Thread Joshua Lippai
Interesting. I can't reproduce your result using either the MacOSX or
WXAgg backend. Which backend are you using, and does the problem
persist if you use a different one?

Josh

On Wed, Feb 18, 2009 at 11:12 AM, Olle Engdegård  wrote:
>
> Doing
>
> from pylab import *
> x=normal(10, size=1000)
> hist(x)
> xlim(0,10)
> savefig("Image.svg")
>
> and then importing the file to Inkscape and saving it there as a pdf gives
> the attached result. The stuff right of x=10 is suddenly there. The weirdest
> thing is that Inkscape _does not see this overspill_!
>
> Not sure what is happening here, cannot reproduce it with plot() instead of
> hist().
>
> Cheers,
> Olle
> --
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> ___
> Matplotlib-devel mailing list
> Matplotlib-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
>
>

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Unit-Test Structure Submitted

2009-02-18 Thread James Evans
All,

I have just submitted a first-cut at a unit-test harness.  The unit-tests do 
require the use of the 'nose' python module.
Everything has been placed in the 'test' directory off of the root trunk 
branch.  There is a README file with lots of information on
how to use it.  This is in addition to a few test cases already bundled in 
(they make great examples)!  The idea is that whenever
somebody adds a new feature or makes a change they update/add the appropriate 
test case and re-run the harness to make sure nothing
is broken.

There is most definitely room for improvement with this, but it gives a 
starting point from which discussions and modifications can
take place.

Any questions or comments?
--James Evans


--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Test

2009-02-18 Thread Nils Wagner
python -i svn/matplotlib/test/run-mpl-test.py

...

==
FAIL: Test numpy shaped data.
--
Traceback (most recent call last):
   File 
"/home/nwagner/svn/matplotlib/test/test_plots/TestPlot.py", 
line 129, in test_shaped_data
 self.checkImage( fname )
   File 
"/home/nwagner/svn/matplotlib/test/mplTest/MplTestCase.py", 
line 57, in checkImage
 self.fail( msg + "\n" + errorMessage )
AssertionError:
   Error: Image files did not match.
   RMS Value: 3.26978179241
   Expected:
 
/home/nwagner/svn/matplotlib/test/test_plots/baseline/TestPlot/shaped_data.png
   Actual:
 /home/nwagner/svn/matplotlib/test/test_plots/outputs/shaped_data.png
   Tolerance: 0.001


--
Ran 16 tests in 6.476s

FAILED (failures=1)
  

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Bug in xlim or savefig or hist?

2009-02-18 Thread Olle Engdegård

On Wed, 18 Feb 2009, Joshua Lippai wrote:
> Interesting. I can't reproduce your result using either the MacOSX or
> WXAgg backend. Which backend are you using, and does the problem
> persist if you use a different one?

Hmm, I see it in at least WXAgg, WX, GTKAgg ...

/Olle

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Unit-Test Structure Submitted

2009-02-18 Thread Fernando Perez
On Wed, Feb 18, 2009 at 11:43 AM, James Evans  wrote:
> All,
>
> I have just submitted a first-cut at a unit-test harness.  The unit-tests do 
> require the use of the 'nose' python module.
[...]


> Any questions or comments?

This is great, many thanks!  I'd just suggest, if possible, adding a
top-level .test() function, so that the usual idiom for package
testing 'import foo;foo.test()' can be applied.  I have a shell
function for that:

function pytest {
# Run the test suite for a python package by name.
# This assumes the package has a top-level .test() routine to run its
# test suite.
local pname=$1

python -c "import $pname;${pname}.test()"
}


that I use for things like testing numpy or scipy easily:

uqbar[~]> pytest numpy
Running unit tests for numpy
[...]
--
Ran 1931 tests in 4.999s

OK (KNOWNFAIL=1, SKIP=11)


Cheers,

f

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel