Skip to main content
added 20 characters in body; edited tags
Source Link
Kuba
  • 137.7k
  • 13
  • 289
  • 751

I want to make a 3d plot with FaceGridsFaceGrids with a certain color scheme. Specifically, I'd like them to be one color below a diagonal line, and a different color above it. (So for example, on the y=0y=0 surface, I'd like the FaceGridsFaceGrids to be pink below x=zx=z, and blue above x=zx=z.)

If I were coloring the plot itself, I'd define a ColorFunctionColorFunction, but it seems that FaceGridsFaceGrids doesn't take ColorFunctionColorFunction as an option. Here's an example of my best attempt:

Graphics3D[Cylinder[], 
 FaceGrids -> {{{0, -1, 
     0}, {{{-1/2, ColorFunction -> Function[{x, y, z}, Hue[z]]}, {0, 
       Green}, {1/2, Blue}}, {-1/3, {1/3, 
       Directive[Thick, Dashed]}}}}}]

Note that while the other gridlines have the properties assigned, the one with a ColorFunctionColorFunction is just gray.

Is there any way to have varying colors on FaceGridsFaceGrids?

I want to make a 3d plot with FaceGrids with a certain color scheme. Specifically, I'd like them to be one color below a diagonal line, and a different color above it. (So for example, on the y=0 surface, I'd like the FaceGrids to be pink below x=z, and blue above x=z.)

If I were coloring the plot itself, I'd define a ColorFunction, but it seems that FaceGrids doesn't take ColorFunction as an option. Here's an example of my best attempt:

Graphics3D[Cylinder[], 
 FaceGrids -> {{{0, -1, 
     0}, {{{-1/2, ColorFunction -> Function[{x, y, z}, Hue[z]]}, {0, 
       Green}, {1/2, Blue}}, {-1/3, {1/3, 
       Directive[Thick, Dashed]}}}}}]

Note that while the other gridlines have the properties assigned, the one with a ColorFunction is just gray.

Is there any way to have varying colors on FaceGrids?

I want to make a 3d plot with FaceGrids with a certain color scheme. Specifically, I'd like them to be one color below a diagonal line, and a different color above it. (So for example, on the y=0 surface, I'd like the FaceGrids to be pink below x=z, and blue above x=z.)

If I were coloring the plot itself, I'd define a ColorFunction, but it seems that FaceGrids doesn't take ColorFunction as an option. Here's an example of my best attempt:

Graphics3D[Cylinder[], 
 FaceGrids -> {{{0, -1, 
     0}, {{{-1/2, ColorFunction -> Function[{x, y, z}, Hue[z]]}, {0, 
       Green}, {1/2, Blue}}, {-1/3, {1/3, 
       Directive[Thick, Dashed]}}}}}]

Note that while the other gridlines have the properties assigned, the one with a ColorFunction is just gray.

Is there any way to have varying colors on FaceGrids?

Source Link
Matt
  • 743
  • 5
  • 15

Can I apply a ColorFunction to FaceGrids, or otherwise have FaceGrids with varying color?

I want to make a 3d plot with FaceGrids with a certain color scheme. Specifically, I'd like them to be one color below a diagonal line, and a different color above it. (So for example, on the y=0 surface, I'd like the FaceGrids to be pink below x=z, and blue above x=z.)

If I were coloring the plot itself, I'd define a ColorFunction, but it seems that FaceGrids doesn't take ColorFunction as an option. Here's an example of my best attempt:

Graphics3D[Cylinder[], 
 FaceGrids -> {{{0, -1, 
     0}, {{{-1/2, ColorFunction -> Function[{x, y, z}, Hue[z]]}, {0, 
       Green}, {1/2, Blue}}, {-1/3, {1/3, 
       Directive[Thick, Dashed]}}}}}]

Note that while the other gridlines have the properties assigned, the one with a ColorFunction is just gray.

Is there any way to have varying colors on FaceGrids?