fix legend entry text size with theme grey#78
Conversation
|
Another inconsistency that is clear from this test case is that there are black axis lines drawn on the first plot but not on the second. For consistency with default ggplot2 appearance we could remove the black axis lines from the first? What do you think? |
|
Appreciate the feedback.
|
|
thanks for this quick fix! |
|
Thanks for the info! |
|
I don't think the logic should care whether or not the size was default. Also I think the default value of 16 should be specified in the theme, not in the getLegendList function. But we previously observed that changing the theme value to 16 results in static ggplot text which is too big. |
|
Interesting, thanks a lot! Will do. |
|
And I start considering that px is still the better option after reading this article https://www.w3.org/Style/Examples/007/units.en.html since
Indeed, it looked inappropriately large on a static plot if I modified the theme. How about magnifying the font size proportionally to px, based on ggplot theme output? something like this: |
| test_that("Warning for invalid character/string input ", { | ||
| viz <- list( | ||
| s=scatterFacet + theme(axis.text.x = element_text(size = "12p"))) | ||
| expect_warning(animint2HTML(viz), "axis.text.x is not numeric nor character ending with \'pt\' or \'px\', will be default 11pt") |
There was a problem hiding this comment.
this is a good test
|
This looks great, thanks for the fix. OK to merge now if you like, after you update DESCRIPTION/NEWS. |
|
Yes, it is possible and easier to specify other text since we had settled down the font size strategy. Thanks! |



Hi @Faye-yufan I noticed an unexpected inconsistency while re-building the animint2 manual.

See screenshot below, notice how legend entry sizes are too small in the second plot. I added a test which says both should be 16px. Can you please investigate and fix?