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

subscript and formulas in rawplot.ylabel #56

Open
daniele7 opened this issue Sep 18, 2019 · 1 comment
Open

subscript and formulas in rawplot.ylabel #56

daniele7 opened this issue Sep 18, 2019 · 1 comment
Assignees
Milestone

Comments

@daniele7
Copy link

Hi,
I would like to include in the rawplot.ylabel special characters and chemical formulas. I have tried few approach but so far no lack.
do you have any suggestion?
thanks
D

@josesho josesho self-assigned this Sep 18, 2019
@josesho josesho added this to the v0.2.3 milestone Sep 18, 2019
@josesho
Copy link
Member

josesho commented Sep 18, 2019

Hi,

Thanks for flagging this up. For some reason we use stringr::str_interp() when passing the user-defined ylabel. This results in any expression() and related commands being parsed directly.

I'll roll a fix to allow for this shortly. In the meantime, you'll have to use unicode characters. (See these Stack Overflow posts: Post 1; Post 2)

library(dabestr)

# Performing unpaired (two independent groups) analysis.
unpaired_mean_diff <- dabest(iris, Species, Petal.Width,
                             idx = c("setosa", "versicolor", "virginica"),
                             paired = FALSE)

plot(unpaired_mean_diff, rawplot.ylabel = "Title (\u03b1 \u03a9)" )

Demo image with unicode ylabel

Sorry for the inconvenience! Hope this helps.

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