How can we set the same color for a surface and a 3D parametric curve in version 9? Here is an example below.

Show[{Plot3D[-y, {t, -1, 0}, {y, -1, 1}, Mesh -> None], 
  ParametricPlot3D[{1, -t, t}, {t, -1, 1}, 
   PlotStyle -> {Thick}]}, PlotRange -> All]

More precisely, how can we determine the color of the surface and set it to the black line?

surface and line

  • $\begingroup$ From your picture, you seem to be using pre-version 10... $\endgroup$ – J. M. is away Aug 19 '17 at 11:52
  • $\begingroup$ @J.M. Yes, it is 9.0 $\endgroup$ – bkarpuz Aug 19 '17 at 11:53
  • 1
    $\begingroup$ The thing is... the "color" in that surface is actually just the lights reflecting off the surface. Try adding Lighting -> "Neutral" to Plot3D[] to see what I mean. Now, since lines do not reflect light... $\endgroup$ – J. M. is away Aug 19 '17 at 11:57
  • $\begingroup$ Oh, I see now. I tought it was like default curve color and filling color for 2d plots. What is the difference between default curve color and filling color for a 2d plot? $\endgroup$ – bkarpuz Aug 19 '17 at 12:04
  • 1
    $\begingroup$ In version 10 onwards, what you ask is reasonable, since the surfaces aren't just white anymore. That color you extracted from Plot[] is ColorData[1, 1]. (See e.g. this.) $\endgroup$ – J. M. is away Aug 19 '17 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.