1

I have 3D-Data, and I plot all Data in a 2D-x-y-Plot (like a view in the x-y-plane into the z-direction). The command looks like:

"plot 'C:\Data.DAT' matrix nonuniform u 1:3 with lines lc rgb "black" smooth unique"

It works fine, and of course all data is plotted in black but I'd like to have a plot with a different color for each 2D-graph. Some kind of an automatic color gradient.

The data structure looks like:

    Number of 2D-Graphs /Tab/ x-Axis tick1 /Tab/  x-Axis tick2 ...
    y-Axis tick1        /Tab/ Data [1,1]   /Tab/  Data [1,2] ...
    y-Axis tick2        /Tab/ Data [2,1]   /Tab/  Data [2,2] ...
    ...

Is this possible?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Peter
  • 11
  • 2

1 Answers1

1

Yes it is possible! It's called the pm3d or color map. It's pretty simple to use, although I had some problems using it in Mac OS I was successful in Linux. I would explain it to you but when I did my research I found this post and I think it explains better than I would. Check it at: http://valavanis-research.blogspot.pt/2012/06/plotting-spectral-maps-or-spectrograms.html

But for a quick view, your data will be arranged in a 3 column file with the format:

xValue yValue zValue

x2Value y2Value z2Value

The configuration file is very easy just set it to "set pm3d map" and the rest is just regular gnuplot configuration.

anatp2015
  • 170
  • 9
  • 1
    This is not what I'm searching for. I don't want a contour plot, I want colored 2-D Graphs. I want a line graph with many differently colored lines. – Peter Apr 21 '15 at 07:17
  • Sorry, I didn't understood your question that way. – anatp2015 Apr 21 '15 at 16:30
  • Did you try to plot your graph by using multiple files, and give to each file a different graph color? I guess That would solve your issue. – anatp2015 Apr 27 '15 at 09:30