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
For some reason, Rmd/Latex decides to disregard plot dimensions when a void theme is used (or axis lines are made not visible).
Both this code:
{r alignment_table_equity, fig.height=4, fig.width=6, fig.align='center'} empty_plot_no_data_message <- function() { p <- ggplot() + annotate( "text", label = "No data were found\nto create this plot", x = 0.5, y = 0.5, size = 6 ) + coord_fixed(xlim = c(0, 1), ylim = c(0, 1)) + theme_classic() + theme( axis.line = element_line(colour = "#FFFFFF"), axis.ticks = element_blank(), axis.text = element_blank(), axis.title = element_blank() ) p } empty_plot_no_data_message()
and this code:
{r alignment_table_equity, fig.height=4, fig.width=6, fig.align='center'} empty_plot_no_data_message <- function() { p <- ggplot() + annotate( "text", label = "No data were found\nto create this plot", x = 0.5, y = 0.5, size = 6 ) + coord_fixed(xlim = c(0, 1), ylim = c(0, 1)) + theme_void() p } empty_plot_no_data_message()
results in the plot dimensions being cut and the empty plot is squeezed in on one page with the other plot.
in contrast to when the axis are visible:
{r alignment_table_equity, fig.height=4, fig.width=6, fig.align='center'} empty_plot_no_data_message <- function() { p <- ggplot() + annotate( "text", label = "No data were found\nto create this plot", x = 0.5, y = 0.5, size = 6 ) + coord_fixed(xlim = c(0, 1), ylim = c(0, 1)) + theme_classic() p } empty_plot_no_data_message()
Code above results in this output (desired):
@AlexAxthelm maybe you can help with this.
The text was updated successfully, but these errors were encountered:
Huh. That's weird. I'll see if anything changes when I start putting stuff into LaTeX boxes.
As a hacky workaround, maybe we set axis & text color to white, so it's there, but invisible?
Sorry, something went wrong.
@AlexAxthelm I tried your suggestion already, see the first chunk of code in the description. Doesn't work.
Well, that's even weirder. I'll keep trying it from the LaTeX side.
does axis.line = element_line(colour = "#FFFFFE"), work?
axis.line = element_line(colour = "#FFFFFE"),
no, that's exactly what I tried :D
No branches or pull requests
For some reason, Rmd/Latex decides to disregard plot dimensions when a void theme is used (or axis lines are made not visible).
Both this code:
and this code:
results in the plot dimensions being cut and the empty plot is squeezed in on one page with the other plot.
in contrast to when the axis are visible:
Code above results in this output (desired):
@AlexAxthelm maybe you can help with this.
The text was updated successfully, but these errors were encountered: