Closed XilinJia closed 1 year ago
Sorry, it is very difficult to reproduce this issue without an example.
If I take your example from #15:
using Plots
inspectdr()
# gr()
function testPlot()
P1 = plot(Plots.fakedata(50,5))
P2 = plot(Plots.fakedata(50,5))
plot(P1, P2, layout=(2,1), size=(1200,600))
gui()
end
I could imagine that you might have tried to label those plots with a title, for example:
plot(P1, P2, layout=(2,1), size=(1200,600), title=["A" "B"])
Note that I needed a row vector (not the default column vector) to get this to work. This is sort of non-intuitive given that your layout is more of a column vector.
...But I think that this is part of the issue with the flexibility of the Plots.jl module. It is not bounded to layouts that are on a simple grid... so the API must reflect that, somehow.
Of course, I am not certain if I am adressing your issue at all - I am sorry about that. I really would need sample code to reproduce your issue.
My mistake I guess because I passed a label to each plot with a Array{String,1}, as
P2 = plot(Plots.fakedata(50,5), label=["fake"])
But this was tolerated by GR.
if I do it with just a string, then there is no problem:
P2 = plot(Plots.fakedata(50,5), label="fake")
Hmm.... I wonder if backends are supposed to support this...
I suggest to close this. Labels should be of type string.
Agreed. This seems to be just how Plots.jl works.
At the line I call gui(), I got the following errors. I can't seem to reproduce it with a demo script. Not sure what is wrong. If I comment out the gui() line, then there is no error and also no plot.