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
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)
All times are GMT -4. The time now is 07:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy