Similar to http://forums.wolfram.com/mathgroup/archive/2009/May/msg00133.html or Plot 4D data with color as 4th dimension, I would like to plot single points {x, y, z} in 3D with a 4th value Q as color function where each dataset has its own Q value. So i cannot use a function because each Q has to be connected to its {x, y, z}-set, but the z level is constant for each dataset. For example:
DataA: {{xA1, yA2, zA, QA1}, {xA2, yA2, zA, QA2}, ...
DataB: {{xB1, yB2, zB, QB1}, {xB2, yB2, zB, QB2}, ...
How would this be implemented here?:
circle3D[centre_: {0, 0, 0}, radius_: 20, normal_: {0, 0, 1}, angle_: {0, 2 Pi}] :=Composition[Line, Map[RotationTransform[{{0, 0, 1}, normal},
centre], #] &, Map[Append[#, Last@centre] &, #] &,
Append[DeleteDuplicates[Most@#], Last@#] &, Level[#, {-2}] &,
MeshPrimitives[#, 1] &, DiscretizeRegion, If]
[First@Differences@angle >= 2 Pi, Circle[Most@centre, radius],
Circle[Most@centre, radius, angle]]
colors =
{{1, RGBColor[1, 0.11, 0.02, 0.75]},
{2, RGBColor[1, 0.22, 0.23, 0.75]},
{3, RGBColor[1, 0.52, 0, 0.75]},
{4, RGBColor[0.93, 0.79, 0.05, 0.75]},
{5, RGBColor[0.63, 0.84, 0.09, 0.75]},
{6, RGBColor[0.4, 0.86, 0.15, 0.75]},
{7, RGBColor[0.1, 0.86, 0.17, 0.75]}};
Data1 =
{{20, 0, z1, 3}, {10, 0, z1, 3}, {0, 0, z1, 3.67}, {-10, 0, z1, 3},
{-20, 0, z1, 3}, {0, 10, z1, 3}, {0, 20, z1, 3}, {0, 10, z1, 3},
{0, -20, z1, 3}, {z1, 100}};
Data2 =
{{20, 0, z2, 2.67}, {10, 0, z2, 3.33}, {0, 0, z2, 4}, {0, 10, z2, 3.67},
{0, 20, z2, 2.33}, {0, -10, z2, 3.67}, {0, -20, z2, 2.33}, {-20, 0, z2, 2.67},
{-10, 0, z2, 3.33}, {z2, 200}};
c1 = Graphics3D[{Dashed, circle3D[{0, 0, 100}, 20]}];
c2 = Graphics3D[{Dashed, circle3D[{0, 0, 200}, 20]}];
Show[
ListPointPlot3D[{Data1, Data2},
Axes -> True,
AxesOrigin -> {0, 0, 0},
ColorFunction -> (Blend[colors, #1] &),
ColorFunctionScaling -> False,
Boxed -> False,
PlotStyle -> PointSize[0.02],
PlotRange -> Automatic,
ImageSize -> Large,
ViewPoint -> {0.8 Pi, -1.5 Pi, 0.20 Pi}],
c1, c2]
Datalists completely different from the others? Can you give us the actual list of data you want to plot? Can you definecircle3D, or link to its definition? – MarcoB Feb 23 '16 at 21:28Data1andData2as you currently define them withListPointPlot3Dbecause they are not lists of 3D points. You must transform them into such lists and while doing so assign numeric values toz1andz2. – m_goldberg Feb 23 '16 at 21:52Data1andData2are not suitable arguments forListPointPlot3Dbecause they not lists of 3D points. Until you do that, I see no reason to reopen this question. – m_goldberg Feb 24 '16 at 17:39