# Problem with "Lighting" in Mathematica V9

I am showing two figures with Show:

a = ListPlot3D[{{0, 0, 3}, {0, 1, 3}, {1, 0, 3}, {1, 1, 3}, {0.25,
0.5, 1}, {0.75, 0.5, 1}}];
b = ListLinePlot[{0, 4, 2, 7, 4, 9}];
c = Graphics3D[{EdgeForm[], {Texture[b], Blue,
Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}},
Axes -> True];
Show[{c, a}]


Now, because I want the background of b to be white, I do :

d = Graphics3D[{EdgeForm[], {Texture[b], Blue,
Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}},
Lighting -> "Neutral", Axes -> True];


But when I do

 Show[{d, a}]


the figure a also becomes white. How can I solve this problem?

Thank you.

To make the 2D figure retain its own colors, independently of the 3D lighting, you could add Glow to the 2D figure. This doesn't add any transparency to the image, and from the question I concluded that you're not really looking for transparency:

a = ListPlot3D[{{0, 0, 3}, {0, 1, 3}, {1, 0, 3}, {1, 1, 3}, {0.25,
0.5, 1}, {0.75, 0.5, 1}}];
b = ListLinePlot[{0, 4, 2, 7, 4, 9}];
c = Graphics3D[{EdgeForm[], {Glow[White], Texture[b], Blue,
Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}},
Axes -> True];
Show[{c, a}]


• Thank you very much, this works perfectly! Commented Jun 24, 2015 at 8:30

What I would do is make the 2D plot background transparent:

b = ImageData@Rasterize[ListLinePlot[{0, 4, 2, 7, 4, 9}], Background -> None];


Then you don't have to have to worry about lighting:

Show[{c, a}]


• thank you. It does the job. But there is a problem with the resolution of b. Can you increase the resolution? I tried adding Raterize->2000 but it did not work. Commented Jun 23, 2015 at 21:33
• You can use RasterSize -> 2000 as an option in Rasterize. But it still doesn't look that flash. Jens' solution looks better. Commented Jun 23, 2015 at 23:55

Setting the lighting in a and then showing a and d in the order a first (order matters) does what I think you want in V10.1. No sure if it will work in V9, but I think it might.

a =
ListPlot3D[{
{0, 0, 3}, {0, 1, 3}, {1, 0, 3}, {1, 1, 3}, {0.25, 0.5, 1}, {0.75, 0.5, 1}},
PlotStyle -> White,
Lighting -> {{"Ambient", RGBColor[1., 0.85, .25]}}]


b = ListLinePlot[{0, 4, 2, 7, 4, 9}, PlotStyle -> {Blue, Thick}]


d =
Graphics3D[{
EdgeForm[], {Texture[b],
Polygon[{{0, 0, 0}, {1, 0, 0}, {1, 1, 0}, {0, 1, 0}},
VertexTextureCoordinates -> {{0, 0}, {1, 0}, {1, 1}, {0, 1}}]}}];

Show[a, d,
BoxRatios -> {1, 1, 1},
PlotRange -> All,
Lighting -> "Neutral"]