This patch was rightly proposed by Hans Dembinski on the matplotlib
devel mailing list but never incorporated it seems.
fix "alpha" kwarg in errorbar plot
- this patch was rightly proposed by Hans Dembinski on the matplotlib
devel mailing list but never incorporated it seems
Seems fine to me. Is there an existing test which could make use of the new/fixed functionality?
I am not really familiar with the testing scheme. It seems the tests compare against saved plot files as seen in the gallery? These do not contain alpha values (otherwise this bug would have surfaced much earlier). I guess that would mean using an alpha value in one of the example plots then?
The tests would test alpha at this level. The only thing the tests don't do is test for alpha that "bleeds" all the way through to transparent parts of the figure itself. In some formats, such as PDF, this isn't even possible anyway.
But I think what would be best here would be to modify one of the errorbar tests to use alpha on some element or other. That should then catch this bug.
@megies Are you comfortable adding in a change to one of the tests, as @mdboom suggests?
Yes, I will adapt one of the tests, no problem.
It just took me a bit to get a grip of the test suite. Running all tests (python -c "import matplotlib; matplotlib.test()") takes too long for my taste and running a single file as a script (python test_axes.py) does not yield the same results for the .png version of the test files. This is due to different rc settings getting used it seems. Even when adding matplotlib.rcdefaults() at the top of test_axes.py I was not able to get the tests to pass running the single file. What is the recommended way to run, say, a single test?
Anyway, I got some ugly work around now and will add the changed test file now..
python -c "import matplotlib; matplotlib.test()"
changing errorbar test to cover "alpha" kwarg
Ok, @dmcdougall, should be OK now.
@megies python tests.py matplotlib.tests.test_axes is what you want.
python tests.py matplotlib.tests.test_axes
Sorry I misread your question. My above suggestion runs a single file. To run a single test you do:
$ python tests.py matplotlib.tests.test_axes:test_errorbar
The py26 error is a dud; merging. Thanks @megies.
Thanks for the info. Glad to help.