JuliaReach / Reachability.jl

Reachability and Safety of Nondeterministic Dynamical Systems
MIT License
50 stars 4 forks source link

GR does not support savefig for index numbers in labels #413

Open schillic opened 5 years ago

schillic commented 5 years ago

Follow-up of #405. See this comment.

The problem is that GR does not support index numbers for axis labels, as in x₁₈₂. I can confirm that saving with PyPlot works. For Plotly I get a different error.

schillic commented 5 years ago

415 made the subindices optional.

mforets commented 5 years ago

A workaround is to use LaTeXStrings, as in plot(..., xlab=L"x_1", ylab=L"x_2").

mforets commented 5 years ago

To recap:

1- GR allows to use unicode in labels, but requires the package LaTexString. To use it, do: using LaTeXStrings; plot(..., xlab=L"x_1", ylab=L"x_2") . 2- Otherwise we can use GR without subindices, i.e displayed as x1 etc, with the option plot(::ReachSolution, use_subindices=false). 3- PyPlot works for x₁ 4- plotly works for x₁

As an action point for this issue i propose to add these alternatives to the docs.

mforets commented 5 years ago

Actually and since GR is somehow the default in JuliaReach, i vouch for using option 1 by default, but this adds the corresponding dependency to LaTeXStrings.

schillic commented 4 years ago

712 used option 2 (i.e., it changed the default to not use subindices). The remaining action point here is to add the option 1 to the documentation.