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

Enable subplot axis label orientation #1424

Merged
merged 1 commit into from
Apr 25, 2020

Conversation

Mattriks
Copy link
Member

@Mattriks Mattriks commented Apr 24, 2020

  • I've updated the documentation to reflect these changes
  • I've added and/or updated the unit tests
  • I've run the regression tests
  • I've built the docs and confirmed these changes don't cause new errors

This PR:

Example

using RDatasets
haireye = dataset("datasets","HairEyeColor")
palette = ["brown","blue","tan","green"]

plot(haireye, y=:Sex, x=:Freq, color=:Eye, ygroup=:Hair,
    Geom.subplot_grid(Geom.bar(position=:stack, orientation=:horizontal),
        Guide.ylabel(orientation=:vertical) ),
    Scale.color_discrete_manual(palette...),
    Guide.colorkey(title="Eye\ncolor"),
    Guide.ylabel("Hair color"), Guide.xlabel("Frequency")
)

haireye

@codecov-io
Copy link

Codecov Report

Merging #1424 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
+ Coverage   89.39%   89.42%   +0.02%     
==========================================
  Files          39       39              
  Lines        4318     4320       +2     
==========================================
+ Hits         3860     3863       +3     
+ Misses        458      457       -1     
Impacted Files Coverage Δ
src/geom/subplot.jl 95.59% <100.00%> (+0.05%) ⬆️
src/guide.jl 89.22% <100.00%> (+0.22%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 72ec042...d3b6619. Read the comment docs.

@bjarthur
Copy link
Member

LGTM. my only comment is that it would be nice to have the example in the docs be different than that in the tests. tests can double as docs, but only to the extent that they are different.

@Mattriks
Copy link
Member Author

I thought the example was too nice 😃 I might add revamping subplot_grid to the next Roadmap (after #1385), to continue what I've started here, in which case I'll change/update the testscripts then.

@Mattriks Mattriks merged commit a23fcdc into GiovineItalia:master Apr 25, 2020
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.

Axis label orientation in subplots
3 participants