We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When changing theme's legend.key.size, it does not have any effect on the legend keys sizes:
legend.key.size
library(tlf) emptyPlot <- initializePlot() scatterPlot <- addScatter(x = c(1, 2, 3), y = c(1, 2, 3)) scatterPlot + ggplot2::theme(legend.key.size = ggplot2::unit(1, "pt"))
scatterPlot + ggplot2::theme(legend.key.size = ggplot2::unit(10, "pt"))
Created on 2023-08-07 with reprex v2.0.2
The text was updated successfully, but these errors were encountered:
Similar result is obtained when using {ospsuite}. This is because LegendKeySize is actually not related to keysize in tlf.
{ospsuite}
LegendKeySize
In default-plot-configuration.R
default-plot-configuration.R
... legendKeysSize = tlf::PlotAnnotationTextSize$plotLegendCaptionSize, legendKeysColor = "black", legendKeysFontFamily = "", legendKeysFontFace = tlf::FontFaces$plain, legendKeysAngle = 0, legendKeysAlign = tlf::Alignments$left, ..
in utilities-plotting.R:
utilities-plotting.R
legendKeysFont <- tlf::Font$new( size = generalPlotConfiguration$legendKeysSize, color = generalPlotConfiguration$legendKeysColor, fontFamily = generalPlotConfiguration$legendKeysFontFamily, fontFace = generalPlotConfiguration$legendKeysFontFace, angle = generalPlotConfiguration$legendKeysAngle, align = generalPlotConfiguration$legendKeysAlign )
So changing the legendKeys related settings will actually affect what is defined as legend.text in {ggplot2} instead of legend.key.
legend.text
{ggplot2}
legend.key
So I would do 3 things here:
legendKeys...
legendText...
Sorry, something went wrong.
No branches or pull requests
When changing theme's
legend.key.size
, it does not have any effect on the legend keys sizes:Created on 2023-08-07 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: