Plots: Labeling



In old Plots I could use sth like:
which doesnt work anymore now.
Also is it possible to increase the legend size and text?!?


I don’t know, which backend you are using. With GR, you can use escape characters (e.g. \\eta):

using Plots

… or with plain GR:

using GR


Sorry PyPlot is my backend…


So unicode is not supported anymore?
What about legend size? (or label size in general)


So nobody here who can help me ?
PS: Ok I found the font stuff again.
So whats only left is the unicode issue…


Unic[quote=“Diger, post:4, topic:1309, full:true”]
So unicode is not supported anymore?What about legend size? (or label size in general)

Unicode support depends on Matplotlib and the fonts. Matplotlib supports Unicode labels but its default font may or may not support the symbols you want. An alternative is to use LaTeX for math symbols in the labels.

For legend size, google legend size in Matplotlib and several answers turn up. It is straightforward to translate this to PyPlot:

using PyPlot
legend(["random numbers"], prop=Dict("size"=>20))


The Matplotlib code works in PyPlot, but not in Plots when using PyPlot as a backend. The Plots syntax for doing this is

using Plots; pyplot()
plot(rand(10), label = "random", legendfont = font(10))

A good trick is to do a page search for “legend” on this page:


Hey, yes thx. I was using unicode since plots with pyplot as backend originally supported only unicode I think. (correct me if im wrong)
If there is a way to use latex symbols in Plots that would help as well.


There is, just using LaTeXStrings, then specify strings with Latex using L, i.e. L"..."


maybe stupid question, but what does:
julia> using latexstrings
WARNING: replacing module LaTeXStrings.
WARNING: replacing module LaTeXStrings.
WARNING: replacing module LaTeXStrings.
WARNING: replacing module LaTeXStrings.
WARNING: replacing module LaTeXStrings.
WARNING: requiring “latexstrings” in module “Main” did not define a corresponding module.
It seems to recognize it though LaTeXStrings is really necessary? Either I would expect it not to work at all or it does, or not?


The module name is case sensitive. You need using LaTeXStrings. (Tab-completion can help you to type this.)

(Are you using Julia 0.4? Julia 0.5 should be better about giving a sensible error message for mis-capitalized module names on case-insensitive filesystems like Mac and Windows:


So this is because I’m using windows that I don’t get a “proper” error?
julia v0.5 on this pc.