Sponsored Content
Special Forums UNIX and Linux Applications GnuPlot - 2d-graph --> depending from size, different color Post 302688349 by IMPe on Saturday 18th of August 2012 08:43:26 PM
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..
 

4 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 05:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy