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

Font family and style cannot be customized #34

Open
kingcrimsontianyu opened this issue Dec 14, 2019 · 1 comment
Open

Font family and style cannot be customized #34

kingcrimsontianyu opened this issue Dec 14, 2019 · 1 comment

Comments

@kingcrimsontianyu
Copy link

Dear dev,
It appears that the code below invoked before plot.nn() would have no effect on the font family and style, and the only customizable parameter is fontsize that must be set via plot.nn(). Is this by design, or am I missing anything? Thank you.

    par(
        family = "Consolas",
        font = 2,      # 2 refers to bold face, for text
        font.lab = 2,  # for x-y labels
        font.main = 2, # for main titles
        font.sub = 2,  # for subtitles
        font.axis = 2
    )
@mnwright
Copy link
Member

You can use grid::gpar() arguments, e.g.:

plot(nn, rep = 1, fontface = "italic", fontfamily = "sans")
plot(nn, rep = 1, fontface = "bold", fontfamily = "mono")

Unfortunately, these are used for all text in the plot (via ... argument) and I don't see an easy way to change that.

As noted in #31, the plot function is not easy to customize and definitely needs some refactoring.

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

2 participants