I suffer a little bit of color blindness, that is the reason why I always prefer to have plots with markers instead of different colors. For instance, I do not like the look of this:

iris = ExampleData[{"MachineLearning", "FisherIris"}, "Data"];
ListPlot[Values[#], PlotLegends -> Keys[#]]& @ 
  GroupBy[iris, Last -> (First[#][[1 ;; 2]] &)]

enter image description here

but largely prefer:

ListPlot[Values[#], PlotLegends -> Keys[#], PlotMarkers -> Automatic]& @ 
  GroupBy[iris, Last -> (First[#][[1 ;; 2]] &)

enter image description here

However, AFAIK the PlotMarkers option is not available for ListPointPlot3D

ListPointPlot3D[Values[#], PlotLegends -> Keys[#]]& @ 
  GroupBy[iris, Last -> (First[#][[1 ;; 3]] &)]

enter image description here

My question: how can I have markers (similar to those available for 2D list plots) in ListPointPlot3D?

  • 1
    $\begingroup$ The markers used in ListPlot and its ilk are special text characters, which is OK for 2D plots, but unsuited for use in 3D plots. That is likely to be why they not supported. The only solution I can think of is to replace the points comprising the plot with insets of 3D graphics objects such as spheres, cubes, and other polyhedra. That is tedious and largely destroys the convenience of ListPointPlot3D, so I suspect it's not the solution you are looking for. $\endgroup$
    – m_goldberg
    Commented Mar 15, 2019 at 15:29
  • $\begingroup$ @m_goldberg thanks for the clarifications, if you want to turn this to an answer I will be happy to accept it. $\endgroup$ Commented Mar 15, 2019 at 15:31
  • $\begingroup$ I am reluctant to do that because I think my comment is, as you say, a clarification, not an answer. A real answer would supply code for making the insets and installing them in the plot. I don't have time to work that out at the moment. Perhaps someone else will tackle it. $\endgroup$
    – m_goldberg
    Commented Mar 15, 2019 at 15:40
  • 1
    $\begingroup$ As an aside: since you seem to like to write concise code, you might want to replace Last -> (First[#][[1 ;; 2]] & with Last -> (#[[1, ;; 2]] &) and Last -> (First[#][[1 ;; 3]] &) with Last -> (#[[1, ;; 3]] &) $\endgroup$
    – m_goldberg
    Commented Mar 15, 2019 at 16:55
  • 3
    $\begingroup$ You will be interested in: Point style in ListPointPlot3D and in: Use a custom 3D graphic for points in ListPointPlot3D, which I think are near-duplicates of your request. $\endgroup$
    – MarcoB
    Commented Mar 15, 2019 at 18:40


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.