New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
xlims and xlabel not working in plotlyjs #1485
Comments
Not only with using Variography
foo = EmpiricalVariogram(eye(3), ones(3))
plot(foo, xlab="foo") # xlab is ignored |
Using |
Hm, it looks as if the axis |
@mkborregaard , I communicated with @sglyon about this problem, and he gave me the following answer at JuliaPlots/PlotlyJS.jl#189 , i.e.,
Could you or @daschw check if removing |
That happens here: https://github.com/JuliaPlots/Plots.jl/blob/master/src/backends/plotly.jl#L361-L363 |
This is apparently due to a change in the plotlyjs specification, where it's only called "xaxis" IF there's only one subplot. Plots' series don't know about subplots, but one solution could be to just always have both keys in there. |
What's the problem with checking for |
I guess you could do that, and then revisit if used in |
Ah, ok, will the axes not be updated with |
I didn't think so but I haven't checked. That would make it easy |
I've already documented the issue here.
Basically, when using plotlyjs as backend to draw 3d graphs, the xlims and xlabel attributes don't work, although they're supported according to this list.
On the other side, 2d plots work fine.
Here's a picture:
And here's the code to reproduce the issue:
`using Plots
plotlyjs()
x = [2,3,4,1]
y = [8,3,1,2]
z = [4,5,3,4]
p1 = plot(x, y, seriestype=:scatter,
title="Hello!", xlabel = "xlabel", ylabel="ylabel",
xlims=(0.0, 6.5), ylims=(0.0,9.0))
p2 = plot(x, y, z, seriestype=:scatter,
title="Hello!", xlabel="xlabel",ylabel="ylabel", zlabel="zlabel",
xlims=(0.0, 80.5), ylims=(0.0,9.0), zlims=(0.0,5.0))
`
Finally, I'd like to stress the usefulness of this feature and why it'd be important for me (and others) to fix as soon as possible. I use graphs to dynamically represent an evolving data set (scatter points). Without xlims, it's very hard for me to visualize the fluctuations in the data, since the axes keep re-scaling according to the extremal values in the set.
The text was updated successfully, but these errors were encountered: