New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
facecolor of patches by FITSFigure.show_{circles,ellipses,rectangles,polygons} is always None #84
Comments
@mojin - this sounds like an old matplotlib bug that was later fixed. Could you do:
? Thanks! |
I've installed dev version of matplotlib, which I wanted to use updated postscript implementation. |
Interesting - I'll look into it! |
@mojin - what color circle (edge and face) does the following script produce?
|
This produce a circle with an edge with black line, but not filled with any color. I understand this is what you expected. There might be something wrong in my script with aplpy. Could you please give an example with aplpy? |
Here's an APLpy example:
The FITS file is here and the output is: Do you get the same? |
I got the same result! |
Ah, interesting - so what do you get for
(i.e. as before, but saving as a PDF, and setting the background of the axes to gray). I have matplotlib 1.1.0 right now, so it could be an old bug that creeped back in. |
https://www.dropbox.com/s/pbhiou4rir6ievq/apltest_circle2.pdf png gives the same result. |
Ok, that's interesting - I'll investigate some more. |
Hi @astrofrog, just had the same problem. |
@wkerzendorf - what version of matplotlib are you using? |
@astrofrog oh actually a development version 1.3.x. So interestingly enough, that works: imshow(random.random((100,100)))
circle = matplotlib.patches.Circle((50, 50), 10, facecolor='none', edgecolor='blue', linewidth=3)
ax = gca()
ax.add_patch(circle)
savefig('test.pdf') |
@mojin @wkerzendorf - sorry for the delay, the latest developer version of APLpy now includes a workaround (6d08bf1) for this Matplotlib bug (matplotlib/matplotlib#1860). |
Add coveralls --rcfile option
When I overlay, for example, circles on an image by using FITSFigure.show_circles() with facecolor='none' (i.e., no color), it always uses the default color set in ~/.matplotlib/matplotlirc ('blue' in my case), which probably means the function automatically change the input facecolor to facecolor=None.
I tried to fix the problem by looking at the code, and I found it works for me when I change aplpy/aplpy.py as follows.
If this is right way to do, other functions, show_rectangles, show_ellipses, and show_polygons, should be fixed accordingly as I have the same problem with them. I'm still not sure this is right way for everybody, but at least works for me and want somebody else to check the issue.
The text was updated successfully, but these errors were encountered: