fix "alpha" kwarg in errorbar plot #1675

Merged
merged 2 commits into from Jan 18, 2013

Projects

None yet

4 participants

@megies
megies commented Jan 17, 2013

This patch was rightly proposed by Hans Dembinski on the matplotlib
devel mailing list
but never incorporated it seems.

@megies megies 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
ac4e0a0
@pelson
Member
pelson commented Jan 17, 2013

Seems fine to me. Is there an existing test which could make use of the new/fixed functionality?

@megies
megies commented Jan 17, 2013

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?

@mdboom
Member
mdboom commented Jan 17, 2013

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.

@dmcdougall
Member

@megies Are you comfortable adding in a change to one of the tests, as @mdboom suggests?

@dmcdougall dmcdougall was assigned Jan 18, 2013
@megies
megies commented Jan 18, 2013

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..

@megies
megies commented Jan 18, 2013

Ok, @dmcdougall, should be OK now.

@dmcdougall
Member

@megies python tests.py matplotlib.tests.test_axes is what you want.

@dmcdougall
Member

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
@dmcdougall
Member

The py26 error is a dud; merging. Thanks @megies.

@dmcdougall dmcdougall merged commit dc37c49 into matplotlib:v1.2.x Jan 18, 2013

1 check failed

Details default The Travis build failed
@megies
megies commented Jan 18, 2013

Thanks for the info. Glad to help.

@tacaswell tacaswell referenced this pull request Jan 23, 2013
Merged

Alpha kwarg fix #1695

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment