Gnuplot command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Gnuplot command
# 1  
Old 05-19-2012
Gnuplot command

My data input looks like this:

Code:
-16.25 -38.75 9.69094
-16.25 -36.25 10.0594
-16.25 -33.75 10.3884
-16.25 -31.25 10.6653
-16.25 -28.75 10.7947
-16.25 -26.25 10.8838
-16.25 -23.75 10.8463
-16.25 -21.25 10.8131
-16.25 -18.75 10.7509
-16.25 -16.25 10.6581
-16.25 -13.75 10.6859
-16.25 -11.25 10.5997
-16.25 -8.75 10.6038
-16.25 -6.25 10.6944
-16.25 -3.75 10.6713
-16.25 -1.25 10.7106

-13.75 -178.75 19.6253
-13.75 -176.25 20.7997
-13.75 -173.75 22.1678
-13.75 -171.25 23.4394
-13.75 -168.75 24.4069
-13.75 -166.25 25.0053
-13.75 -163.75 25.2403
-13.75 -161.25 25.1125
-13.75 -158.75 24.6719
-13.75 -156.25 24.0381
-13.75 -153.75 23.2834
-13.75 -151.25 22.5541
-13.75 -148.75 21.8328
-13.75 -146.25 21.2981
-13.75 -143.75 20.7591
-13.75 -141.25 20.325
-13.75 -138.75 19.9369
-13.75 -136.25 19.4663
-13.75 -133.75 19.0484
-13.75 -131.25 18.5709
-13.75 -128.75 18.0059
-13.75 -126.25 17.4819
-13.75 -123.75 17.0388
-13.75 -121.25 16.6344
-13.75 -118.75 16.2572
-13.75 -116.25 15.6875
-13.75 -113.75 15.215
-13.75 -111.25 14.7719
-13.75 -108.75 14.2809
-13.75 -106.25 13.7406
-13.75 -103.75 13.3084
-13.75 -101.25 12.7847
-13.75 -98.75 12.3344
-13.75 -96.25 11.965

I am using splot, to produce a 3D graph as a function of two variables x, y.
I want to try to control the colour scale used by gnuplot, by modulating the value of the data in column three, $3 (the component being plotted).

I want to tell gnuplot that if
Code:
$3<20 then $3=$3 but if $3>20 then $3=20.

Any ideas?


In the terminal,
Code:
gnuplot
set pm3d
set view 0,0,1,2
set view equal xy #to make a square graph
splot "graph.dat" u 1:2:3 ($3<20:$3=$3:$3>20:$3=20) title "graph"


Last edited by programmerc; 05-19-2012 at 06:07 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gnuplot 3d binning

Hello I have a text file with tens of thousands of rows The format is x y where both x and y can be anything between -100 and +100. What I would like to do is have a 3d gnuplot where there are 10,000 squared or bins and each bin will count how many rows have a value that would be... (1 Reply)
Discussion started by: garethsays
1 Replies

2. Shell Programming and Scripting

Gnuplot in bash

Hi, I want a graph plot using gnuplot for df -h command. like filesystem, total size and avail size. Thanks, Anjan ---------- Post updated at 02:35 PM ---------- Previous update was at 02:34 PM ---------- I want a graph plot using gnuplot for df -h command per hour. (4 Replies)
Discussion started by: Anjan1
4 Replies

3. Shell Programming and Scripting

Performing loop in gnuplot - splot command

Hi, I have been struggling for quite past few days to make or generate graphs using a loop in the GNUPLOT. I am trying to generate a contour plot using "splot" command in gnuplot. I am able to do for a single file successfully. But i am unable to make it work for more number of files using a... (2 Replies)
Discussion started by: begin_shell
2 Replies

4. UNIX and Linux Applications

gnuplot trouble

I am having a bit of trouble plotting a histogram in gnuplot. I am trying to use it to draw bars side by side. The first bar is from column five in my data file. The second bar is actually three bars stacked on top of each other and should be as tall as the first bar. The data is from the 2nd,... (0 Replies)
Discussion started by: kingnothing
0 Replies

5. Emergency UNIX and Linux Support

GNUPLOT help needed

Dear All, I am new to GNUPLOT :D and dont know how it works, but actually there is a LINUX script generated by me which is running & capturing data in real time, the problem is that i want to plot that data in real time using GNUPLOT.:confused: please help.:wall: (5 Replies)
Discussion started by: jojo123
5 Replies

6. UNIX and Linux Applications

gnuplot limitations

I'm running a simulation (programmed in C) which makes calls to gnuplot periodically to plot data I have stored. First I open a pipe to gnuplot and set it to multiplot: FILE * pipe = popen("gnuplot", "w"); fprintf(pipe, "set multiplot\n"); fflush(pipe); (this pipe stays open until the... (0 Replies)
Discussion started by: sedavidw
0 Replies

7. UNIX and Linux Applications

GNUplot

Hi, I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg: for example plot filename.txt It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg. Any idea why? :confused: (1 Reply)
Discussion started by: cosmologist
1 Replies

8. AIX

Sarcheck - gnuplot 3.7.1

Good Afternoon, I'm having an issue finding the correct libX11.a fileset on my 595 running AIX 5.3.0.0. Currently I'm trying to instal Sarcheck on my nim master. The problem occurs during the GNUPLOT installation. error: failed dependencies: libX11.a(shr4.o) is needed by gnuplot-3.7.1-1... (3 Replies)
Discussion started by: vincent1117
3 Replies

9. UNIX for Dummies Questions & Answers

Help with gnuplot

Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this? Moreover, is it possible to save things from the... (0 Replies)
Discussion started by: KTTFB64
0 Replies
Login or Register to Ask a Question