-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Set facecolor of FilledArrow axisline style and fix tight layout #24085
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
Conversation
bdcafbc
to
0d5f40a
Compare
9140a3d
to
e06bfc6
Compare
e06bfc6
to
ec114ab
Compare
ec114ab
to
fe7c9ed
Compare
36c0201
to
2c59421
Compare
2c59421
to
8744b18
Compare
Something seems very wrong with the subplotzero test image as the Axiss appear doubled? |
That is the exact code (and result) of #7617. Although strange, I wasn't sure how to modify it to make sure that the issue was tested exactly as it should be. |
Oh, 🐑 I'm apparently deeply confused about what it "should" do. |
If you want to test for #7617 (that y axis label is incorrectly set), below is the minimum I can think of and that also looks okay. import matplotlib.pyplot as plt
from mpl_toolkits.axisartist.axislines import SubplotZero
fig = plt.figure()
ax = fig.add_subplot(111, axes_class=SubplotZero)
ax.set(xlim=(-3, 7), ylim=(-3, 7), xlabel="x", ylabel="y")
zero_axis = ax.axis["xzero", "yzero"]
zero_axis.set_visible(True) # they are hidden by default which should give you below. I would add ax.axis["left", "right", "bottom", "top"].set_visible(False)
zero_axis.set_axisline_style("->")
zero_axis.major_ticks.set_tickdir("inout") which will give |
8744b18
to
f55f98a
Compare
Thank you very much! I've updated the test (dropped set_tickdir as that gave an error |
f55f98a
to
164a28c
Compare
164a28c
to
5d163cd
Compare
Co-authored-by: Jae-Joon Lee <lee.j.joon@gmail.com>
PR Summary
Original purpose was to test axisline style, but as part of that:
Add support for providing
facecolor
to aFilledArrow
, defaulting to the same color as the axes edgecolor.Make tight (and other) layouts work for axislines by fixing get_window_extents, thanks to @leejjoon
Closes #7617 (fixed elsewhere, but adding test here).
PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).