After recently updating Julia from 1.4 to 1.6 I’ve found I can’t display data in scatter plots.
Plots works fine for standard line charts, but using scatter(x,y) or plot(x,y,seriestype=:scatter) both just display axes with no visible data points…
Here are the docs. If it doesn’t help, please post some code, starting from
using Plots to the end with a verbal description of what happens and/or the error message.
Ok, I can create a scatter plot, however, not with code that worked previously under 1.4.
I am wondering if it has something to do with sourcing the data from a Dataframe. See how it plots fine in the line chart, but the scatter chart has invisible points.
Also, those little red stop signs on the extracted columns from the data series weren’t there under 1.4. When I mouse over them I get a “Something went wrong displaying this object error”.
I have no idea what a Sentinel array is, but maybe this is the cause of the scatter fail?
Is there a reason you are using dot syntax for
x and view syntax for
y? If you make the
y line look like the
x line, does it change? Alt. inspect
x and see if it shows as something more familiar.
Otherwise I would suggest you run this in repl so you know the eval order and can see any error messages.
Can you copy-paste the code, rather than including an image? It will allow us to grab it and see if it works on our end.
Please see these tips!
Field1 is an input on the reactive Pluto notebook and this worked really well for selecting and slidering through a huge dataset amazingly quickly. PlutoUI is really neat!
x = [df1[!,"SowingYear"],df2[!,"SowingYear"]]
Which works for the line plot but generates the same error for scatter.
I am not sure how I can express y in dot form but I don’t expect that will solve it. Hrmm
the following fixed it
x = [collect(view(df1,!,"SowingYear")),collect(view(df2,!,"SowingYear"))]
y = [collect(view(df1,!,field1)),collect(view(df2,!,field1))]
Not as succinct as the old version but it pulls the data out of the
SentinelArray.ChainedVector that seems to be hanging scatter