-
Notifications
You must be signed in to change notification settings - Fork 633
Bug of Scatter3D plots for only one point with multilevel? #576
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
Comments
In fact I want to perform a machine learning algorithm on the iris data. According to the result, some points may be incorrect predicted. And I want to figure out this kind of points. For example, if the first data is miss-classified, I still want to have the same symbol shape, just want to change the color. Like this,
You can see the square-shaped black point (miss-classified) in setosa group. This is in fact what I want in the end. But I don't want to change it by giving a symbol name, I hope it perform automatically. |
If you want to remove the legend of the black dot, simply add "showlegend = FALSE" in the "add_trace" call.
I think your questions are not development related, perhaps you could consider asking them in stackoverflow instead. |
Sorry I asked here, but I still believe it must be a bug for single point with multi levels.
|
As far as I see, plotly is doing exactly what you instructed it to do. Here is my understanding.
To solve your problem, I thought about using 'as.numeric' instead of 'as.character', but somehow plotly doesn't convert the numbers according to https://plot.ly/r/reference/#box-marker-symbol.
|
I must thank you for your patient. It goes very close to the end version which I want.
|
One uses colours if there are many levels as plotly only supports up to 8 symbols as far as I know.
there is no mention of allowing numeric encoding of symbols. The reference is possibly outdated. |
I have run the following code to test these symbols, but any code couldn't generate the correct answer.
One can find in the legend labels that there are only 4 symbols
If I put the symbol parameter into the marker list, the symbols in the legend displays correctly, but none of the point are really with the symbol converted.
Now I added the symbolset into the function. The output is almost same with the first plot but the incorrect legend labels.
Finally, the following code convert some points correctly, but some not. You can see, the triangle and dot symbols don't work. If I replace the symbol "dot" with the name "circle", than it works well for "circle". What is wrong with the outrageously symbols?
|
pretty sure this is a duplicate of #577 |
plot_ly(x = iris[1,1], y = iris[1,2], z = iris[1,3], type = "scatter3d", symbol = iris[1,5])
The text was updated successfully, but these errors were encountered: