5
$\begingroup$

Using the default setting, I can have my desired ChromaticityPlot3D as

ChromaticityPlot3D["LAB", "LAB"];

However, the problem with this plot is that it has (probably) the PlotRange as {{0.,1.},{-1.3,1.3},{-1.3,1.3}} and I don't want these additional ranges beyond {-1.,1.}.

Therefore, when I set the PlotRange as {{0.,1.},{-1.,1.},{-1.,1.}} I can see only the top and the bottom planes (using the default view setting).

Is it possible to have the PlotRange as {{0.,1.},{-1.,1.},{-1.,1.}} and still see the ChromaticityPlot3D as it is seen with the default settings?

Edit 1 Or may be the ranges for the CIE LAB is considered as {0,1},{-1.28,1.27},{-1.28,1.27}

$\endgroup$
0

2 Answers 2

2
$\begingroup$
cp = ChromaticityPlot3D["LAB", "LAB"]

enter image description here

PlotRange[cp]

{{2.22045*10^-16, 1.}, {-1.28, 1.28}, {-1.28, 1.28}}

cp2 = cp /.  GraphicsComplex[x_, p__] :>  GraphicsComplex[ 
  Transpose[{#, Clip[#2, {-1, 1}], Clip[#3, {-1, 1}]} & @@ Transpose[x]], p]

enter image description here

PlotRange[cp2]

{{2.22045*10^-16, 1.}, {-1., 1.}, {-1., 1.}}

$\endgroup$
1
  • $\begingroup$ This rescales the whole picture. The slices would look different on different planes I think. $\endgroup$
    – Greg Hurst
    Commented Aug 23, 2018 at 16:06
2
$\begingroup$

We can plot our own version:

RegionPlot3D[
  -1 <= a <= 1 && -1 <= b <= 1 && 0 <= L <= 1,
  {a, -1, 1}, {b, -1, 1}, {L, 0, 1}, 
  Axes -> True,
  AxesLabel -> SuperStar /@ {"a", "b", "L"},
  BoxRatios -> {1, 1, 1}, 
  ColorFunction -> Function[{a, b, L}, LABColor[L, a, b]], 
  ColorFunctionScaling -> False, 
  Lighting -> "Neutral", 
  Mesh -> None
]

enter image description here

$\endgroup$

Your Answer

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

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