what software you use for obtaining graphs by data?
which software is better to draw x-y graphs in ubuntu?(there are columns of data i obtained by postProcessing OF)
|
The answer depends on everyone's opinion/like and dislike. Personally, my preference is gnuplot.
|
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? |
Quote:
Code:
plot 'datafile.dat' using 1:2 with lines Quote:
Code:
set terminal png For everything beyond this point, my favorite site is: http://web.archive.org/web/201007261...t/index-e.html |
thanks Alex
that site is banned here.could you give me another link? |
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 |
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? |
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' |
1 Attachment(s)
I have plot this figure with below commands in a file:
Code:
set terminal png |
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... |
1 Attachment(s)
Thanks Alex,
it is like this now. how can extend the x axis and decrease legend area? :) |
I am not sure what you mean by "extend the x-axis"
You could adjust the range Code:
set xrange [xmin:xmax] Code:
set size xsize,ysize And please attach figures as figures ;) |
1 Attachment(s)
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. |
excluding "(" character
in U column there are some exess ('s,how can exclude them in gnuplot?
Code:
# Source : sampledSurface sampledSurface Code:
gnuplot> load "U.plt" |
I found this that seems contains what I needmbut its banned!
http://codejourneys.blogspot.com/200...ot-basics.html |
Quote:
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:
Quote:
|
1 Attachment(s)
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. |
1 Attachment(s)
in this data file,some lines aren't in proper position in the column,how can automatically fix it?
|
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. |
Quote:
Code:
plot "datafile.dat" every 5 w p 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:
The only issue with this datafile are the brackets. But we already had that. Quote:
Quote:
|
4 Attachment(s)
Quote:
Code:
gnuplot> plot 'h1.dat' u 1:4 ti 'h1-Temperature' w l linestyle 1,"h2.dat" u 1:4 ti 'h2-Temperature' w l linestyle 2,"h3.dat" u 1:4 ti "h3-Temperature" with lp linestyle 3 |
3 Attachment(s)
But that works for another case with attached files.
Quote:
|
this error shown when I added "every" option,what may be the cause?
Code:
gnuplot> load "Ux.plt" |
Quote:
Quote:
With the method I described, the line within the plot will be continuous and contain all data points, while there will only be few points to enhance visibility. Quote:
Not 100% sure about the correct sequence, so try one of the following Code:
plot 'h1.dat' u 1:7 w l linestyle 1 t 'h1-x_Velocity',"h2.dat" u 1:7 w l linestyle 2 t 'h2-x_Velocity',"h3.dat" every 5 u 1:7 with p linestyle 3 t "h3-x_Velocity" |
Quote:
Code:
gnuplot> plot "p.plt" |
Greetings to all!
I don't have much time to spare today, so I can't play with gnuplot myself :(. Nonetheless, here are the instructions for installing the gnuplot documentation and example on Ubuntu:
Bruno |
Hi
that resolved,the ranges wasn't appropriate, but I didn't grasp how to set linestyles to have lines and points concurrently and points be less.:confused: |
1 Attachment(s)
it resolved,thanks,
the attached is the result with this command: Code:
plot 'h1.dat' u 1:3 ti 'h1-pressure' w l linestyle 1,"h2.dat" u 1:3 ti 'h2-pressure' w l linestyle 2,"h3.dat" u 1:3 every 20 with lp linestyle 3 t "h3-pressure" |
an issue is that the output page that graph is plotted on that has fixed size.
my data's are very high in numbers in x-axis side.I want my graph be wider without need to make it smaller in y-direction by size commands.I want to have a more wider page in fact rather than a smaller graph in the same page output. is there any way to change dimensions of output page? it seems it has compacted in x-direction now. |
another issue is that is it possible to do some calculations on columns before plotting by gnuplot,like multiplying one column to another column and divide by a constant?
|
Quote:
Code:
set terminal pngcairo size 1200, 600 Quote:
Code:
plot 'h1.dat' u 1:($2*5.0) |
thanks Alex,
how I should act if I want to for example subtract two columns in two data files from each other? |
I have no idea, and apparently, there is no way to do this in gnuplot directly.
But google seems to know another way to do this if you search for "gnuplot compare two files" and hit the first result. You can be sure that EVERY question you might have concerning gnuplot has already been answered somewhere on the web. |
in this link:
http://objectmix.com/graphics/139945...le-figure.html it says to use: plot '< join fileA.dat fileB.dat' using 1:N+1 |
how can add all numbers in a column in gnuplot and the number of figures(for obtaining an average of them)?
|
this page seems to have some information about averaging in gnuplot but is banned here:(
can anyone help to read the page or know about averaging in gnuplot?:) http://gnuplot-tricks.blogspot.com/ |
1 Attachment(s)
http://www.phyast.pitt.edu/~zov1/gnu...tatistics.html
Quote:
|
thanks Alex,then how I have to use averaging?
|
I found this also,but isn't clear what have to do exactly.:confused:
http://www.manpagez.com/info/gnuplot...nuplot_419.php |
1 Attachment(s)
how can draw two sided arrows for specifying a part of plot parallel to x-direction?(arrow be in x-axis to distinguish a part of plot over a period of time)
for example in the figure attached I want to distinct 0.0347 till 0.0355 by an arrow. (is there a way to send this type of figures as image?) |
All times are GMT -4. The time now is 21:54. |