Reachability.jl icon indicating copy to clipboard operation
Reachability.jl copied to clipboard

GR does not support savefig for index numbers in labels

Open schillic opened this issue 7 years ago • 5 comments

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 avatar Dec 14 '18 08:12 schillic

#415 made the subindices optional.

schillic avatar Dec 16 '18 13:12 schillic

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

mforets avatar Jan 27 '19 05:01 mforets

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 avatar Mar 11 '19 20:03 mforets

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.

mforets avatar Oct 22 '19 12:10 mforets

#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.

schillic avatar Nov 20 '19 19:11 schillic