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

Dev 1.1.0 #25

Merged
merged 43 commits into from
Aug 26, 2020
Merged

Dev 1.1.0 #25

merged 43 commits into from
Aug 26, 2020

Conversation

LiRogers
Copy link
Contributor

Changes relate to new functionality in ggplot2 3.3 and new functions to apply gglaplot style to plotly plots. The package now depends on ggplot2 v3.3.

New features

  • gglaplot style can now be added to plotly plots by %>% it into ggla_plotly_settings(). This adjust the plotly layout, style and config settings. Each of these can applied seperately (and adjusted with addtional arguments) with ggla_plotly_layout(), ggla_plotly_style() and ggla_plotly_config(). (closes Link to plotly #23)

Major changes

  • left_align_labs() is being deprecated. The functionality to fully left align titles, subtitles and captions is now included in theme_gla(). Left aligning the legend is an open issue in ggplot2 which will be resolved in v3.4.
  • y-axis labels now sit on tick marks. A default value for the length is set which should work for most plots. For plots with particularly long y-axis labels or a y-axis title the tick mark length can be adjusted with y_label_length in theme_gla(). (closes Long y-axis labels mess up alignment #21)
  • theme_gla() now includes a boolean arguement free_y_facets. This should be used for faceted plots with free scales on the y axis. This changes the position of the y-axis labels

Bug fixes

ggplot2 3.3.0 includes theme attributes to do this.
These have been added to gla_theme
And roxygen version
Changes to margins to allow titles, subtitles and y text to fit.
Shift y axis labels to sit on axis ticks
Donuts and Horizbars shouldn't have them, so add call to theme to remove
ggla_axisat0 needs the axis tick at 0 to be the same colour, adjust theme call to have strong_grid for first line, and light grid for rest
Add option for setting y_label_length
Add panel spacing for faceting
Basic plotly functionality
New vignette explaining how to use gglaplotly
This shouldn't have been commited
Mean functions can be applied to base plotly figures as well as ggplots converted to plotly
ggplotly can now be used with ggla_line
Change from gglaplotly to settings function
Adjust facet settings
Add faceting examples and make changes need following changes to theme_gla
last_plot is in both ggplot2 and plotly and was causing a conflict
Move elipses into previous plotly::style call, was causing an error if no further args were given
@LiRogers LiRogers merged commit 660a81f into Greater-London-Authority:master Aug 26, 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.

Titles overlapping plot Link to plotly Long y-axis labels mess up alignment
1 participant