You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current default for x-axis annotations is to be left-justified, e.g.:
library(outbreaks)
library(incidence2)
x<-ebola_sim_clean$linelist %>%
incidence(date_index=date_of_onset, interval="month")
plot(x) + scale_x_incidence(x, format="%d %M %Y")
#> Scale for 'x' is already present. Adding another scale for 'x', which will#> replace the existing scale.
I suspect most users will want to center the labels by default. It could be done by adding a center_labels = TRUE by default to scale_x_incidence, but this argument already exists with a different meaning (position of the tick marks) in the plot method.
One solution would be to:
rename center_labels to center_tick in the plot method
add a center_labels argument to scale_x_incidence
But I am sure there are other options - just can't think of a good one atm.
The text was updated successfully, but these errors were encountered:
closed with the v0.2.0 release 06d70b4. I've renamed center_labels to center_ticks and fixed a bug so the labels are centrally placed and nicely spaced for facets.
The current default for x-axis annotations is to be left-justified, e.g.:
I suspect most users will want to center the labels by default. It could be done by adding a
center_labels = TRUE
by default toscale_x_incidence
, but this argument already exists with a different meaning (position of the tick marks) in theplot
method.One solution would be to:
center_labels
tocenter_tick
in the plot methodcenter_labels
argument toscale_x_incidence
But I am sure there are other options - just can't think of a good one atm.
The text was updated successfully, but these errors were encountered: