Sponsored Content
Full Discussion: Gnuplot command
Top Forums Shell Programming and Scripting Gnuplot command Post 302643321 by programmerc on Saturday 19th of May 2012 04:46:51 AM
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..
 

9 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

9. 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
ISPRINT(3)						   BSD Library Functions Manual 						ISPRINT(3)

NAME
isprint -- printing character test (space character inclusive) LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <ctype.h> int isprint(int c); DESCRIPTION
The isprint() function tests for any printing character, including space (' '). The value of the argument must be representable as an unsigned char or the value of EOF. In the ASCII character set, this includes the following characters (preceded by their numeric values, in octal): 040 sp 041 ``!'' 042 ``"'' 043 ``#'' 044 ``$'' 045 ``%'' 046 ``&'' 047 ``''' 050 ``('' 051 ``)'' 052 ``*'' 053 ``+'' 054 ``,'' 055 ``-'' 056 ``.'' 057 ``/'' 060 ``0'' 061 ``1'' 062 ``2'' 063 ``3'' 064 ``4'' 065 ``5'' 066 ``6'' 067 ``7'' 070 ``8'' 071 ``9'' 072 ``:'' 073 ``;'' 074 ``<'' 075 ``='' 076 ``>'' 077 ``?'' 100 ``@'' 101 ``A'' 102 ``B'' 103 ``C'' 104 ``D'' 105 ``E'' 106 ``F'' 107 ``G'' 110 ``H'' 111 ``I'' 112 ``J'' 113 ``K'' 114 ``L'' 115 ``M'' 116 ``N'' 117 ``O'' 120 ``P'' 121 ``Q'' 122 ``R'' 123 ``S'' 124 ``T'' 125 ``U'' 126 ``V'' 127 ``W'' 130 ``X'' 131 ``Y'' 132 ``Z'' 133 ``['' 134 ``'' 135 ``]'' 136 ``^'' 137 ``_'' 140 ```'' 141 ``a'' 142 ``b'' 143 ``c'' 144 ``d'' 145 ``e'' 146 ``f'' 147 ``g'' 150 ``h'' 151 ``i'' 152 ``j'' 153 ``k'' 154 ``l'' 155 ``m'' 156 ``n'' 157 ``o'' 160 ``p'' 161 ``q'' 162 ``r'' 163 ``s'' 164 ``t'' 165 ``u'' 166 ``v'' 167 ``w'' 170 ``x'' 171 ``y'' 172 ``z'' 173 ``{'' 174 ``|'' 175 ``}'' 176 ``~'' RETURN VALUES
The isprint() function returns zero if the character tests false and returns non-zero if the character tests true. COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The iswprint() function should be used instead. SEE ALSO
ctype(3), isalnum_l(3), iswprint(3), ascii(7) STANDARDS
The isprint() function conforms to ISO/IEC 9899:1990 (``ISO C90''). BSD
July 17, 2005 BSD
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy