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

Error parsing pi #107

Open
sverek opened this issue Jan 16, 2019 · 1 comment
Open

Error parsing pi #107

sverek opened this issue Jan 16, 2019 · 1 comment

Comments

@sverek
Copy link

sverek commented Jan 16, 2019

When using pi in for example plot(xlims=(0,pi)) the generated LaTeXcode is

xmin = {0}, xmax = {π = 3.1415926535897...}

Workaround:

fpi=Float64(pi)
plot(xlims=(0,fpi))
@tawheeler
Copy link
Member

tawheeler commented Jan 20, 2019

Right. If you enter π into the terminal you get:

julia> π
π = 3.1415926535897...

For something in PGFPlots to work it must show just a number. In this case the Irrational{:π} type renders additional, unsupported text.

PGFPlots does little to no type checking, leaving it free to user to use whatever they want (strings, Float, Int, custom types, etc.). Cases like this are a side effect of that freedom.

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