Menu

splot, how do you specify color for top side and underside of a surface

Help
2017-05-14
2017-05-14
  • Brian Murphy

    Brian Murphy - 2017-05-14

    set hidden
    splot 'plot3d.dat' nonuniform matrix with lines
    The above gives me a surface plot with the top side green and underside purple. I like it that the two sides have different colors, but I would like to specify those colors.

    splot 'plot3d.dat' nonuniform matrix with lines lc 'red'
    The above makes both sides red.
    How is the color of each side specified?

    Once I get that figured out, I want to plot 2 nonuniform matrix surfaces in a single splot, and use the same colors for both surfaces. I can get the plot I want with default colors, but not with the colors I want.

     
  • Ethan Merritt

    Ethan Merritt - 2017-05-14

    The top side is the color of lt N, by default the bottom side is the color of lt N+1
    You can change the offset using the command
    set hidden3d offset <offset>
    So if you like colors 1 and 3 for the top and bottom surfaces of functions f() and g() you could say
    set hidden3d offset 2
    splot f(x,y) lt 1, g(x,y) lt 1

     
  • Brian Murphy

    Brian Murphy - 2017-05-14

    Thanks bunches for the reply, Ethan. It's working now. :)
    Changing lc to lt is what did it.
    splot 'plot3d.dat' nonuni mat index 0 w l lt 1 , '' nonuni mat index 1 w l lt 1

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.