Skip to content
New issue

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

Recipes cannot set default fonts #555

Closed
ChrisRackauckas opened this issue Oct 29, 2016 · 6 comments
Closed

Recipes cannot set default fonts #555

ChrisRackauckas opened this issue Oct 29, 2016 · 6 comments

Comments

@ChrisRackauckas
Copy link
Member

In order to set default fonts, one needs to do something like:

  xtickfont --> font(11)
  ytickfont --> font(11)
  legendfont --> font(11)
  guidefont  --> font(11)

However, font is in Plots and not RecipesBase, so changing the default font requires a Plots dependency.

@tbreloff
Copy link
Member

tbreloff commented Nov 2, 2016

I've had this thought from other perspectives. Really the "correct" solution is to have a bunch of attributes: guidefontsize, guidefontfamily, etc... and then guidefont would be a way to set all of those at once, similar to marker or line. The downside is that it's a lot of new attributes to maintain/access, and the upside is that this issue wouldn't exist. :)

@ChrisRackauckas
Copy link
Member Author

I think that's the right way to go since font doesn't really fit in with the way the other attributes work.

@ma-laforge
Copy link
Contributor

A few additional coments:

  1. There should be a way to scale all fonts simultaneously. Possibly adding the following to the ~/.juliarc.jl file:
PLOTS_DEFAULTS = Dict(:fontadjust => 1.5)
  1. It would be nice if this attribute was also available "@ runtime":
plt = plot(...)
display(plt) #Want smaller font to maximize real-estate

plot!(size=(1000,800), fontadjust=2.2) #Make more readable on print.
png("morereadbleplot.png")

@juliohm
Copy link

juliohm commented Jul 19, 2017

This is a recurring issue and a very nice feature to have. Thank you for reporting it @ChrisRackauckas.

@mkborregaard
Copy link
Member

mkborregaard commented Jul 26, 2017

All that's needed is for someone to implement this change in practice:

  • unexport the Font type (it can still be used internally)
  • add the new keywords
  • updating the handling of keywords to form the Font object
  • specify a new 'font' magic keyword

@ChrisRackauckas
Copy link
Member Author

This is great to see! Thanks!

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

No branches or pull requests

5 participants