Skip to content
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

Replace step with stairs and correct subplot_adjusts #112

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

oscargus
Copy link
Member

Closes #109
Closes #111

Hard to make the subplot_adjusts figure look really good, but here is the update one:
image

Stairs illustration:
image

(Both are screen shots of the PDF.)

Not obvious which arguments should be used. I went with those that are (a bit) "special" for stairs.

@oscargus oscargus force-pushed the stairsandadjustments branch from 21e7a63 to cafa722 Compare May 21, 2022 13:14
Copy link
Contributor

@jimustafa jimustafa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The adjustments look good. For the stairs plot, the gridlines are on top of the stairs. Using ax.set_axisbelow(True) can fix this.

scripts/advanced-plots.py Show resolved Hide resolved
@timhoffm
Copy link
Member

timhoffm commented May 21, 2022

Style suggestions:

  • in the subplot_pars, make the arrows dark grey like the figure width boundary lines. This should make the figure and the annotations more distinct. Right now we have a bit of abundance of hard to distinguish parallel lines.
  • in the stairs, maybe use some a number of steps that does not march the grid so that not all steps align with the grid, c.f. the original step example.
  • do not use vertical lines at the edge of the plot. They are mostly covered by the spine but a bit shines through. This does it look clean.

@oscargus oscargus force-pushed the stairsandadjustments branch from cafa722 to 8b63fb3 Compare December 31, 2022 13:29
@oscargus
Copy link
Member Author

I just recalled this...

  • The lines were in fact dotted, but now they and the arrows are all gray. Not so obvious if the "external" arrows should be "on top" of the boxes, but I do not think the alternative looks better...
  • All other example matches the grid only uses the basic arguments (not matching the grid will require using edges). While possible, I thought one of the ideas to use stairs rather than steps was to avoid hassling with this aspect... (For example, we can adjust the widths of the bars as well, but maybe not suitable for a cheat sheet example.)
  • I modified the plot so that the first and last segment is at zero.

@oscargus
Copy link
Member Author

image

image

@oscargus oscargus force-pushed the stairsandadjustments branch from 8b63fb3 to 44f015c Compare December 31, 2022 13:42
@rougier
Copy link
Member

rougier commented Jan 1, 2023

Could you align y position on the grod for the stairs plot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace step with stairs? 'right' and 'top' in plt.subplots_adjust() are not directly padding size
4 participants