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

Add support for vertical orientation #13

Merged
merged 1 commit into from
Sep 23, 2019
Merged

Add support for vertical orientation #13

merged 1 commit into from
Sep 23, 2019

Conversation

asongtoruin
Copy link
Contributor

As mentioned in #12 this commit adds support for vertically-oriented plots.. I've tested it a bit with plot_direction and it seems to behave in a sensible manner, e.g.

False_3_SW
True_3_SW

You can create a full set of these graphs with

for direction in ('NW', 'SW', 'NE', 'SE'):
    for vertical in [True, False]:
        for rows in [4, 3]:
            fig = plt.figure(
                FigureClass=Waffle, rows=rows, vertical=vertical, plot_direction=direction, values=[5, 3, 2],
                title={
                    'label': f'vertical={vertical}, rows={rows}, plot_direction={direction}',
                    'loc': 'left'
                },
            )
            fig.savefig(f'{vertical}_{rows}_{direction}.png', bbox_inches='tight')
            plt.close('all')

@asongtoruin
Copy link
Contributor Author

One additional tweak that might be nice to make would be to allow the user to only specify the number of columns required, though I haven't got round to looking at this yet.

@gyli gyli merged commit 61dcb2d into gyli:master Sep 23, 2019
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.

None yet

2 participants