CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Visualization & Post-Processing

what software you use for obtaining graphs by data?

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   June 30, 2013, 03:48
Default what software you use for obtaining graphs by data?
  #1
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
which software is better to draw x-y graphs in ubuntu?(there are columns of data i obtained by postProcessing OF)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   June 30, 2013, 18:13
Default
  #2
Senior Member
 
Julien de Charentenay
Join Date: Jun 2009
Location: Australia
Posts: 228
Rep Power: 8
julien.decharentenay is on a distinguished road
Send a message via Skype™ to julien.decharentenay
The answer depends on everyone's opinion/like and dislike. Personally, my preference is gnuplot.
__________________
---
Julien de Charentenay
julien.decharentenay is offline   Reply With Quote

Old   July 1, 2013, 05:29
Default
  #3
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks Julien
whats the command for making a graoh of a file containing columns of x and y?
and how can save the graph that is obtained?
can do this in LibreOffice Calc in your opinion?
whats your opinion about SciDAVis?have you worked with it?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   July 1, 2013, 11:21
Default
  #4
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
Quote:
whats the command for making a graoh of a file containing columns of x and y?
For the datafile format you describe, you could start with

Code:
plot 'datafile.dat' using 1:2 with lines
Quote:
and how can save the graph that is obtained?
Depends on what you want exactly.

Code:
set terminal png
set output 'mygraph.png'
replot
will save a .png file of your plot.
For everything beyond this point, my favorite site is:

http://web.archive.org/web/201007261...t/index-e.html
immortality likes this.
flotus1 is offline   Reply With Quote

Old   July 1, 2013, 11:35
Default
  #5
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks Alex
that site is banned here.could you give me another link?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   July 1, 2013, 13:02
Default
  #6
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
What a pity! This really is the best site for gnuplot.
You could try to google for "gnuplot not so frequently asked questions" and see if there is another archive of this page you are allowed to view.

This would be another one
http://lowrank.net/gnuplot/index-e.html
http://www.ualberta.ca/~xz10/gnuplot/index-e.html
flotus1 is offline   Reply With Quote

Old   July 1, 2013, 13:46
Default
  #7
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
we have both internal and external censorship here!
is this link good enough?http://heim.ifi.uio.no/inf3330/scrip...o/index-e.html
read what parts?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   July 2, 2013, 06:12
Default
  #8
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
This looks like an older version of Kawanos gnuplot site, so yes, it has all the information you need.
Since gnuplot has a learning curve, be prepared to spend a few hours before your first plot looks exactly the way you want it to. Consequently, you will have to start with the "introduction to gnuplot" section.
If you have any specific questions you cant figure out by yourself, feel free to ask.

Yust one hint: put your gnuplot commands in a text file instead of typing them in the shell. This way, you wont have to repeat all commands to produce similar plots.
Load the commands in gnuplot via
load 'textfile.plt'
immortality likes this.
flotus1 is offline   Reply With Quote

Old   September 7, 2013, 06:32
Default
  #9
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
I have plot this figure with below commands in a file:
Code:
set terminal png
set output "pressures.png"
set xlabel "time(seconds)"
set ylabel "pressure(pa)"
set title "average-pressures-horizontal lines"
set xrange []
set yrange []
set mxtics 5
set mytics 5
set xtics 0.0004
set ytics 100000
# set zoom .5
plot 'h1.dat' u 1:3 ti 'h1-pressure' w lines linestyle 1,"h2.dat" u 1:3 ti 'h2-pressure' w dots,"h3.dat" u 1:3 ti "h3-pressure" with dots
but it doesn't appear so good,the titles are on graphs,how can make it better?
Attached Images
File Type: png pressures.png (23.7 KB, 16 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 07:14
Default
  #10
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
There are many ways to improve on the look of the figure.
First of all, the png-terminal has to go. Try "set terminal pngcairo" instead of "set terminal png".
The figure will look way better with this terminal.

For the key placement and the other options of the key, type "help set key" in gnuplot.
I guess something like "set key outside top right" will do the trick.

And another hint: putting "reset" in the first line of your file will make sure you only get the settings you specify in this file.
Changing the terminal type once again at the end of the file, for example by putting "set terminal wxt" in the last line will prevent some mysterious bugs...
immortality likes this.
flotus1 is offline   Reply With Quote

Old   September 7, 2013, 07:31
Default
  #11
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
Thanks Alex,
it is like this now.
how can extend the x axis and decrease legend area?
Attached Files
File Type: gz pressures.pngcairo.tar.gz (33.1 KB, 1 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 07:58
Default
  #12
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
I am not sure what you mean by "extend the x-axis"
You could adjust the range
Code:
set xrange [xmin:xmax]
or adjust the size of the plot
Code:
set size xsize,ysize
Type "help margin" for more info on how to adjust the margins of the figure.
And please attach figures as figures
flotus1 is offline   Reply With Quote

Old   September 7, 2013, 08:15
Default
  #13
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
I want x-axis be longer with more labels,
it shows an error of "invalid file" so I have to compress it so that be in gzip format.
Attached Files
File Type: gz pressures.pngcairo.tar.gz (53.2 KB, 0 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 15:32
Default excluding "(" character
  #14
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
in U column there are some exess ('s,how can exclude them in gnuplot?
Code:
# Source : sampledSurface sampledSurface
# Faces  : 2800
# Time	sum(magSf)	areaAverage(p)	areaAverage(T)	areaAverage(rho)	areaAverage(h)	areaAverage(U)
0.034525496	0.000207	412747.851309	699.045809721	2.29910981899	426932.686479	(3.98516072783 -1.93539686763 0)
0.034526496	0.000207	412307.846999	698.629256448	2.299132434	426454.791707	(2.86786702681 1.25593261295 0)
0.034527496	0.000207	412530.493165	698.467481475	2.30206486527	426244.44026	(1.83515655768 0.623689287519 0)
0.034528496	0.000207	410317.413572	697.305787988	2.29871440673	424875.712989	(0.975030544888 2.83769037365 0)
this is the error that gnuplot shows:
Code:
gnuplot> load "U.plt"

gnuplot> plot 'h1.dat' u 1:7 ti 'h1-x_Velocity' w l linestyle 1,"h2.dat" u 1:7 ti 'h2-x_Velocity' w l linestyle 2,"h3.dat" u 1:7 ti "h3-x_Velocity" with lp linestyle 3
                                                              ^
         "U.plt", line 29: warning: Skipping data file with no valid points

gnuplot> plot 'h1.dat' u 1:7 ti 'h1-x_Velocity' w l linestyle 1,"h2.dat" u 1:7 ti 'h2-x_Velocity' w l linestyle 2,"h3.dat" u 1:7 ti "h3-x_Velocity" with lp linestyle 3
                                                                                                                ^
         "U.plt", line 29: warning: Skipping data file with no valid points

gnuplot> plot 'h1.dat' u 1:7 ti 'h1-x_Velocity' w l linestyle 1,"h2.dat" u 1:7 ti 'h2-x_Velocity' w l linestyle 2,"h3.dat" u 1:7 ti "h3-x_Velocity" with lp linestyle 3
                                                                                                                                                                      ^
         "U.plt", line 29: warning: Skipping data file with no valid points

gnuplot> plot 'h1.dat' u 1:7 ti 'h1-x_Velocity' w l linestyle 1,"h2.dat" u 1:7 ti 'h2-x_Velocity' w l linestyle 2,"h3.dat" u 1:7 ti "h3-x_Velocity" with lp linestyle 3
                                                                                                                                                                       ^
         "U.plt", line 29: all points y value undefined!
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 16:53
Default
  #15
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
I found this that seems contains what I needmbut its banned!
http://codejourneys.blogspot.com/200...ot-basics.html
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 7, 2013, 18:30
Default
  #16
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
Quote:
Originally Posted by immortality View Post
I want x-axis be longer with more labels,
it shows an error of "invalid file" so I have to compress it so that be in gzip format.
Try to play around with the margin settings ("set lmargin a" and "set rmargin b" with low integer values for a and b).
You can also try to adjust the size of the plot by "set size 1.2,1.0" or something in that range.
To control the number of labels, use "set xtics start_value, increment" will do.
Again, gnuplot has some sort of documentation on this topic "help set xtics"

Quote:
Originally Posted by immortality View Post
in U column there are some exess ('s,how can exclude them in gnuplot?
I dont know if this is possible in gnuplot, but any text editor has a search&replace functionality if you have no influence on the format of the datafile directly.

Quote:
Originally Posted by immortality View Post
I found this that seems contains what I needmbut its banned!
http://codejourneys.blogspot.com/200...ot-basics.html
The site has some very basic information, but the "not so frequently asked questions" page has the same information and a lot more.
immortality likes this.
flotus1 is offline   Reply With Quote

Old   September 8, 2013, 05:08
Default
  #17
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
thanks Alex,
how can increase the distance between points in linepoints style?
in the image points are too close and it seems like a continous line.
Attached Files
File Type: gz Ux.pngcairo.tar.gz (55.9 KB, 2 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 8, 2013, 05:39
Default
  #18
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
in this data file,some lines aren't in proper position in the column,how can automatically fix it?
Attached Files
File Type: gz h2.dat.tar.gz (73.2 KB, 1 views)
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 8, 2013, 05:53
Default
  #19
Senior Member
 
immortality's Avatar
 
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,173
Rep Power: 16
immortality is on a distinguished road
and do you mean this site by "not so frequently asked questions"?
http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
it can't be open.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King.
To Be or Not To Be,Thats the Question!
The Only Stupid Question Is the One that Goes Unasked.
immortality is offline   Reply With Quote

Old   September 8, 2013, 06:17
Default
  #20
Senior Member
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 1,034
Rep Power: 17
flotus1 will become famous soon enough
Quote:
Originally Posted by immortality View Post
thanks Alex,
how can increase the distance between points in linepoints style?
in the image points are too close and it seems like a continous line.
This can be achieved wit the "every" plot option.
Code:
plot "datafile.dat" every 5 w p
will only plot every 5th point in your data set.
Edit:
With the linepoints stile, I guess you want to have every data point for the line to have a smooth line but only few points for the points...
I did that plotting the same data twice, once as a line and a second time with points using the every option.
The drawback is that you cant have the same representation of the linestyle in the key automatically as far as I know. Some editing of the figure will be required.

Quote:
Originally Posted by immortality View Post
in this data file,some lines aren't in proper position in the column,how can automatically fix it?
Why would you need to fix that? Gnuplot doesnt care about the "look" of the datafile as long as there are datafile separators between each column.
The only issue with this datafile are the brackets. But we already had that.

Quote:
Originally Posted by immortality View Post
and do you mean this site by "not so frequently asked questions"?
http://t16web.lanl.gov/Kawano/gnuplot/index-e.html
it can't be open.
Didnt we find a version of this page that you have access to?
Quote:
we have both internal and external censorship here!
is this link good enough?http://heim.ifi.uio.no/inf3330/scrip...o/index-e.html
read what parts?
flotus1 is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CAD integrated CFD Software kostikr Main CFD Forum 3 February 4, 2010 14:38
Exporting data (cell values, ascii) and obtaining more data than cells! TfG FLUENT 0 May 26, 2009 15:24
IFStream read float point data problem liu OpenFOAM Running, Solving & CFD 0 October 24, 2008 12:14
How to update polyPatchbs localPoints liu OpenFOAM Running, Solving & CFD 6 December 30, 2005 17:27
Seeking for flow field (vector plot) visualization software. Hua Main CFD Forum 7 January 25, 1999 11:33


All times are GMT -4. The time now is 18:52.