GnuPlot - 2d-graph --> depending from size, different color

 
Thread Tools Search this Thread
Special Forums UNIX and Linux Applications GnuPlot - 2d-graph --> depending from size, different color
# 1  
Old 08-18-2012
GnuPlot - 2d-graph --> depending from size, different color

Hi,

i would like to change color depending from the valuerange.
a gnuplot-script will generate a multiplot and in one graph,
the ranges should have different colors, e.g.
100 ... 133 --> red
200 ... 233 --> blue
300 ... 333 --> orange
400 ... 433 --> green

Code:
#Partikeldata - Partikel INDEX  - [ 4 ]
set size 1,0.17
set origin 0,0.32
set format x ""
#set key left Left bot font "Helvetica,8" 
set noxlabel 
#set log y
#set mytics 10
#set grid mytics linestyle 0 linewidth .8
set yrange [50:450]
set ytics (100,133,200,233,300,333,400,433)
#set format y "10^{%L}"
#set grid x
set key left Left bot font "Helvetica,8" 
set noxlabel 
set label 1 "Partikel-INDEX" at graph 1.0, graph 0.5 rotate by 90 center offset 1,0 font "Helvetica,8"
set cbrange [100:433]
set palette defined (0 "blue",17 "#00ffff",33 "white",50 "yellow",\
    66 "red",100 "#990000",101 "grey")
plot "${Home}/scripte/index.txt" using 1:(\$2) t '   PD < 0,532 µm' w p pt 6 ps 0.2 lc rgbcolor "#999999"

Image

I tried to solve it with the blue colored "set range / set palette" but it didnt work - all the generated dots are red. Can somebody help me?
Thanks in advance!
IMPe

Last edited by IMPe; 08-18-2012 at 10:38 PM..
# 2  
Old 08-18-2012
What I usually see done for this is plotting different graphs for different values, making mathematical functions that exclude the data above and below certain values (i.e. making it discontiguous).

Another option would be using pm3d, which would let the colors change smoothly. But using pm3d pretty much means you're doing everything freeform 3d, and have to start worrying about whether your polygons are thick enough to be seen as lines etc.
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing duplicates depending on file size

Hi all, I am working with a huge amount of files in a Linux environment and I was trying to filter my data. Here's what my data looks like Name............................Size OLUSDN.gf.gif-1.JPEG.......5 kb LKJFDA01.gf.gif-1.JPEG.....3 kb LKJFDA01.gf.gif-2.JPEG.....1 kb... (7 Replies)
Discussion started by: Error404
7 Replies

2. Shell Programming and Scripting

Problem creating graph with gnuplot with time on x-axis

Let me start by saying I'm new to gnuplot and not very good at unix at all.. Anyway, I'm each minute measuring temperature and humidity and saves the last 60 readings along with time in a textfile, values_minute. The contents of the file is formatted like this: time temperature humidity ... (8 Replies)
Discussion started by: hakro807
8 Replies

3. Programming

Draw Bar Graph for GNUPLOT

For example, I have a file called data.txt. And the content is: Iker_Casillas 181 Raphael_Varane 182 Sergio_Ramos 182May I know how to write a script for gnuplot, so I can have a bar graph as the column 1 will be the x and column 2 will be the y? And I hope that the x value can be seen clearly.... (0 Replies)
Discussion started by: Tzeronone
0 Replies

4. Shell Programming and Scripting

gnuplot flat line graph

Hi, I'm not able to find a solution because I cant find the exact keyword for this. I wanna make a graph like ive shown in the attachment. Could someone please share ideas on how to do this. Thanks! (3 Replies)
Discussion started by: jamie_123
3 Replies
Login or Register to Ask a Question