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

Can't reproduce examples from setXAxis docs #220

Closed
IndrajeetPatil opened this issue Feb 24, 2022 · 1 comment · Fixed by #221
Closed

Can't reproduce examples from setXAxis docs #220

IndrajeetPatil opened this issue Feb 24, 2022 · 1 comment · Fixed by #221

Comments

@IndrajeetPatil
Copy link
Member

I have a hunch that this has something to do with updates to isIncluded function in the latest version of ospsuite.utils.

what the outputs used to look like

image

what they look like now

The axes labels are different.

library(tlf)

myPlot <- addLine(x = c(1, 2, 3), y = c(10, 50, 100))

setXAxis(myPlot, scale = Scaling$log)

setXAxis(myPlot, ticks = c(1, 2, 3), ticklabels = parse(text = c("alpha", "beta", "gamma")))

Created on 2022-02-24 by the reprex package (v2.0.1.9000)

@pchelle
Copy link
Collaborator

pchelle commented Feb 24, 2022

I think you are right.
parse(text = c("alpha", "beta", "gamma")) creates a vector of type expression which is not a base object type and gets an error.
In the {tlf} function createPlotTicks, isOfType is assessed after isIncluded so I can swap those and prevent the error

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

Successfully merging a pull request may close this issue.

2 participants