Open llrt opened 4 years ago
Can you give an example of what you are trying to do in your 3rd dotpoint? It's definitely possible to mix Compose graphics and Gadfly plots.
@Mattriks I would like to do something along those lines below in R (example from bbplot repo):
axis.ticks = ggplot2::element_blank(),
axis.line = ggplot2::element_blank(),
panel.grid.major.y = ggplot2::element_line(color="#cbcbcb"),
strip.background = ggplot2::element_rect(fill="white"),
strip.text = ggplot2::element_text(size = 22, hjust = 0)
Basically. when element_text
is present, a label is drawn; when element_blank
is present, that block is suppressed. And you can add other elements, like lines, logos, etc.
For text, this would be easy to implement:
major_label
(or major_label_text
), minor_label
, point_label
, key_title
, key_label
, which will accept the new struct in 2.struct TextFormat
with fields font
, fontsize
, color
, padding
etc. major_label_font
etc) for deprecationGuide.xlabel
, Guide.ylabel
etc allowing a transition to the new Theme fields.I think this is a nicer syntax, and has some advantages (easy to add new fields e.g. padding
#1514)
Comments? Name suggestions for the new struct in 2 welcome!
For text, this would be easy to implement:
- Add 5 new Theme fields:
major_label
(ormajor_label_text
),minor_label
,point_label
,key_title
,key_label
, which will accept the new struct in 2.- Create a new struct e.g.
struct TextFormat
with fieldsfont
,fontsize
,color
,padding
etc.- Mark old Theme fields (
major_label_font
etc) for deprecation- Update code for Guides, e.g.
Guide.xlabel
,Guide.ylabel
etc allowing a transition to the new Theme fields.I think this is a nicer syntax, and has some advantages (easy to add new fields e.g.
padding
#1514)Comments? Name suggestions for the new struct in 2 welcome!
Nice suggestion! I think this shall address many points in the original request, making the API cleaner. I agree with suggested approach.
Hi,
First, I would like to thank and congratulate everyone involved for this neat, amazing package! Nice job, guys!
I would like to reproduce in my plots in Gadfly a ggplot BBC-like style (https://github.com/bbc/bbplot/blob/master/R/bbc_style.R), but current settings differs a lot in detail. My current pains and suggestions are:
Thank you all!