Hi, I’m using a lot Plots.jl as I like having the common interface, but right now using mostly the PyPlot backend. I don’t want to use directly PyPlot as I coded some Plots recipes that I use.
I have trouble with the legend (the markers in the legend are too large, so that we cannot see the linestyles below, e.g. cannot distinguish a solid line and a dashed line if there are square markers symbols superimposed).
As I cannot find such options in Plots attributes, I though I could as a workaround access the PyPlot object and modify it.
So I tried something like (where
p is the plot produced by Plots)
for ax in p.o.axes hdl = p.o.legend().legendHandles for ln in hdl if :_legmarker in keys(ln) ln._legmarker.set_markersize(2) end end end
but it doesn’t work at all (the code runs, but doesn’t look to do anything).
Is there a difference between accessing
p.o or using directly the PyPLot interface with e.g.
gcf? Is it ok to modify a figure like that after creation?
On my exported figure (I export after in pgf format), many settings such as the figure size are changed… I ideally would like to modify just the legend and keep the rest intact.
Any idea how to solve that, or a workaround?