Visit Our UNIX and Linux User Community


Performing loop in gnuplot - splot command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Performing loop in gnuplot - splot command
# 1  
Old 02-28-2013
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 loop in GNUPLOT.

Kindly post your comments, which would be helpful for me.

Following is the code for generating a single contour splot in GNUPLOT.

Here the file name "950_stress" consists of three numeric columns. One column denotes the x-axis coordinates, second column denotes y-axis coordinates and third column has the stress values.

Code:
splot '950_stress' with lines
set xlabel "x-coordinate"
set ylable "y-coordinate"
set zlabel "stress-distribution"
set title "950_stress"
set dgrid3d
set contour
set cntrparam bspline
set pm3d
set hidden3d
set terminal png
set output '950.png'
replot


I just wanted to do it for data files named from 950_stress to 1950_stress (ie) almost 1000 files.

Put your expert way to do this using LOOP for GNUPLOT splot command. It is to be noted that the title of the graphs and the name of the output of the graph should change accordingly with respect to datafile numbering.

Code:
set title "950_stress"
set output '950.png'

# 2  
Old 02-28-2013
How did you go with the solution I posted for you in this thread?

https://www.unix.com/shell-programmin...#post302768950
# 3  
Old 03-01-2013
Quote:
Originally Posted by Chubler_XL
How did you go with the solution I posted for you in this thread?

That is not the solution. The using loop inside gnuplot seems to be different than using it normally.

I have tried with it as it is ., it did not worked.
Done with some changes, again no use of it.

Previous Thread | Next Thread
Test Your Knowledge in Computers #563
Difficulty: Medium
The comparison operators are only used for comparing numerical data types.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Awk: Performing "for" loop within text block with two files

I am hoping to pull multiple strings from one file and use them to search within a block of text within another file. File 1PS001,001 HLK PS002,004 MWQ PS004,002 RXM PS004,006 DBX PS004,006 SBR PS005,007 ML PS005,009 DBR PS005,011 MR PS005,012 SBR PS006,003 RXM PS006,003 >SJ PS006,010... (11 Replies)
Discussion started by: jvoot
11 Replies

2. Solaris

Solaris not booting with new BE after performing Liveupgrade.

After getting the new BE created and activating the new BE with luactivate command, OS is still booting with OLD BE. Steps followed below.. bash-3.2# bash-3.2# lustatus Boot Environment Is Active Active Can Copy Name Complete Now On Reboot... (3 Replies)
Discussion started by: Kumar07
3 Replies

3. Shell Programming and Scripting

Performing aggregation in File

Hi, I need help in UNIX shell script to handle the following: I have file called File1.txt which contains data something like below: LibraryName|BookName|Flag-Indicator|COUNT LIB1|BOOK1|A|12 LIB1|BOOK1|A|2 LIB2|BOOK2|I|1 LIB2|BOOK1|I|4 LIB1|BOOK2|A|12 LIB1|BOOK1|I|22... (3 Replies)
Discussion started by: vfrg
3 Replies

4. Programming

Performing a while for two files

Hi, This is for Perl. I have a while loop, and would like to process two files, the formats are given below : access access.<previousday>-* How can perform a while loop on both logs, while creating the logic for access.<previousday>-* to get format like "access.20130615-124139" when... (11 Replies)
Discussion started by: susankoperna1
11 Replies

5. Shell Programming and Scripting

Gnuplot command

My data input looks like this: -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... (0 Replies)
Discussion started by: programmerc
0 Replies

6. UNIX for Advanced & Expert Users

slow performing system

Friends Greetings. I have a RedHat 5.7 64bit virtual server on VMware ESXi 4.1. This server and other Redhat Servers are running very slow. I did some stats collection on ESXi and looks like Linux is holding the disk IO. I am not sure what is causing this behavior. On Linux I checked the CPU... (4 Replies)
Discussion started by: sdewal
4 Replies

7. Shell Programming and Scripting

Performing lookup quickly

Hello, Have been trying to develop a script that reads a string from an input file then looks up that string in a reference file to get a number, then inset that number back into the original file at a certain point (_____): Input File: HARRY JON _____ AA M N PETER PIE ... (8 Replies)
Discussion started by: dendright
8 Replies

8. UNIX for Dummies Questions & Answers

performing queries on file data

Can anyone help.. I have a .dat file which contains 5 columns of data. I need to select one row containing just 3 of the columns. I'm not sure how to select a single row? I then need perform arithmetic on on two out of the three columns and display the output in a new column. For example.. ... (1 Reply)
Discussion started by: computersaysno
1 Replies

9. Programming

performing a task at regular intervals

hi! i m tryin to write a program that will perform a specific tasks after fixed interval of time.say every 1 min. i jus donno how to go abt it.. which functions to use and so on... i wud like to add that i am dont want to use crontab over here. ny lead is appreciated. thanx. (2 Replies)
Discussion started by: mridula
2 Replies

10. UNIX for Advanced & Expert Users

Performing a non-recursive find in Unix

I need to perform a non-recursive find in Unix. Sounds simple, but it doesn't actually work. The command ALWAYS searches through the subdirectories. Any ideas? I am on DEC Unix :-( (3 Replies)
Discussion started by: christallott
3 Replies

Featured Tech Videos