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?

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

3 Comments

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.
Sorry, I didn't understood your question that way.
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.