Showing posts with label Gnuplot. Show all posts
Showing posts with label Gnuplot. Show all posts

Thursday, March 31, 2011

Gnuplot: save plot in jpeg

This are some useful commands:

set terminal jpeg

set output "fig.jpeg"

replot

set terminal x11

Friday, March 25, 2011

Log scale in gnuplot plots

The corresponding command is:

set log xy

Monday, January 17, 2011

Very important commands in Gnuplot

Plot two or more plots in the same window:

set multiplot

Plots with lines:

plot "file.dat" w l

Plot with yerrorbars. The third column of the input data is the lenght of the errorbar:

plot "file.dat" with errorbars

Hide the legend:

unset key

Friday, November 5, 2010

3D plots in gnuplot

The comand is:

gnuplot> splot "positions.dat"

Saturday, October 16, 2010

Gnuplot

Useful comands to plot histograms:

gnuplot> set style data histograms
gnuplot> plot "random1.dat" using 2:xticlabels(1)
gnuplot> set boxwidth 0.9 relative
gnuplot> set style histogram clustered gap 0
gnuplot> set style fill solid

Some interesting examples:
http://objectmix.com/graphics/140008-gnuplot-histogram-has-large-spaces.html

If we don't want to show the key:

gnuplot>unset key