1
$\begingroup$

This question already has an answer here:

I am VERY new to Mathematica, and am having some difficulty with visualization. I have a series of points in 3 dimensions (x,y,z) being read from an Excel file. I can visualize the plot fine using ListPointPlot3D, and even organize my values into groups. What I can NOT figure out is how to have the coordinates show up as text over the circles representing the 3d coordinates. Here is my code:

O1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {3,4,5},{2,3,4}}]
O1BO = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {3,4,5},{5,6,7}}]
CB1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {7,8,9},{2,3,4}}]
CB1BO = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {7,8,9},{5,6,7}}]
CB2RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {11,12,13},{2,3,4}}]
CB2BO = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {11,12,13},{5,6,7}}]
IS1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {15,16,17},{2,3,4}}]
IS2RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {19,20,21},{2,3,4}}]
MT1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {23,24,25},{2,3,4}}]
DCB1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {27,28,29},{2,3,4}}]
DTB1RC = Import["/Volumes/Macintosh HD/Users/James/Desktop/EmFiles/2016_3DPlot_Base.xlsx", {"Data", 1, {31,32,33},{2,3,4}}]

ListPointPlot3D[{O1RC,O1BO,CB1RC,CB1BO,CB2RC,CB2BO,IS1RC,IS2RC,MT1RC,DCB1RC,DTB1RC}, AxesLabel -> {"Hue Score Change", "Value Score Change", "Chroma Score Change"}, 
    PlotLabel -> "H2O2 Changes to Sample Colour",
    Background -> White,
    PlotStyle -> {Directive[LightRed, PointSize[0.04], Opacity[0.8]],
                Directive[Red, PointSize[0.02]],
                Directive[LightGreen, PointSize[0.04], Opacity[0.8]],
                Directive[Green, PointSize[0.02]],
                Directive[LightBlue, PointSize[0.04], Opacity[0.8]],
                Directive[Blue, PointSize[0.02]],
                Directive[LightCyan, PointSize[0.04], Opacity[0.8]],
                Directive[LightGray, PointSize[0.04], Opacity[0.8]],
                Directive[LightMagenta, PointSize[0.04], Opacity[0.8]],
                Directive[LightYellow, PointSize[0.04], Opacity[0.8]],
                Directive[LightBrown, PointSize[0.04], Opacity[0.8]]},
    PlotLegends -> {"O1RC", "O1BO", "CB1RC", "CB1BO", "CB2RC", "CB2BO", "IS1RC", "IS2RC", "MT1RC", "DCB1RC", "DTB1RC"},
    PlotTheme -> "Marketing",
    Filling -> Bottom];

All I want is for the 3 coordinates (x,y,z values) for each of the points generated above to display on the 3d plot. I've looked at Tooltip, Text, and Labeled, but am having difficulty figuring out how to use any of those to get what I want. Do I need to use Graphics3D instead of a themed ListPointPlot3D, and then play around with the Show command to display the coordinate labels? Help!

$\endgroup$

marked as duplicate by Yves Klett, MarcoB, m_goldberg, rhermans, user9660 Feb 15 '16 at 15:30

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3
$\begingroup$

Here is an example of one way of putting a text label showing the coordinates centered above each of your points.

O1RC={1,1,1}; O1BO={1,2,5}; CB1RC={2,4,7}; CB1BO={3,8,9}; CB2RC={4,10,12};
Show[
  ListPointPlot3D[{O1RC, O1BO, CB1RC, CB1BO, CB2RC}],
  Graphics3D[Map[Text[ToString[#],#,{0,-1}]&, {O1RC,O1BO,CB1RC,CB1BO,CB2RC}]]
]

which displays

enter image description here

For your problem you would use Import to assign values to each variable and use the complete list of your points. And then you desktop publish that image. Remember there are at least half a dozen different ways of doing almost anything in Mathematica. One that you can remember and have it work for you on the first try is often the best one for you.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.