Skip to content
This repository has been archived by the owner on Nov 2, 2023. It is now read-only.

axis_label_text_font_size in theme_axis does not respond #226

Open
bdpiccolo opened this issue Jul 27, 2018 · 2 comments
Open

axis_label_text_font_size in theme_axis does not respond #226

bdpiccolo opened this issue Jul 27, 2018 · 2 comments

Comments

@bdpiccolo
Copy link

The axis_label_text_font_size does not seem to respond to my input. However, major_label_text_font_size does.

figure() %>%
  ly_points(1:10) %>%
  theme_axis(c("x", "y"), 
	axis_label_text_font_size = "25pt",
	major_label_text_font_size = "25pt")

bokeh_plot

Running rbokeh_0.5.0 on R version 3.5.1.

Have not tried the development version as my work's firewall doesn't allow me to install from github.

Keep up the good work!

@Atrebas
Copy link

Atrebas commented Jul 28, 2018

Confirmed. It looks like the font_size values are correctly passed as attributes, but not used to render the plot. Instead, for major labels, rendering is done using the axis_label_text_font_size attribute.
A dirty hack could be to modify the plot object manually (line bkf$x$spec$theme$axis$axis_label_text_font_size = "30pt" below). It will apply to both x and y.

bkf = figure() %>%
     ly_points(1:10) %>%
     theme_axis(c("x", "y"), 
                axis_label_text_font_size = "20pt",
                major_label_text_font_size = "20pt")

## check values
bkf$x$spec$model$x_axis$attributes
bkf$y$spec$model$y_axis$attributes
## render plot
bkf
## check axis_label_text_font_size value
bkf$x$spec$theme$axis$axis_label_text_font_size
## modify
bkf$x$spec$theme$axis$axis_label_text_font_size = "30pt"
## render plot
bkf

@Kinga277
Copy link

I have this same problem with axis_label_text_font_size.
You help me a lot with the label font size.
Thank you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants