The environment opens in the console and you can add your commands after gnuplot>. Gnuplot can be run interactively ( :~$ gnuplot. f ( x ) = 3 * x + 5 # We define two linear functions g(x) = 4 * x plot f ( x ) title '3*x+5' with lines linestyle 1, \ # We plot f(x) using linestyle 1 g(x) title '4*x' wit h lines linestyle 2 # and g(x) using linestyle 2 set xlabel 'x' # Set the label for the x-axis set ylabel 'y' # Set the label for the y-axis set key top left # The set key enables a key (or legend) describing plots on a plot. ![]() set style line 2 linecolor rgb '#dddd1f' linetype 1 linewidth 2 set xzeroaxis linetype 3 linewidth 2.5 # It draws the x axis. set style line 1 linecolor rgb '#0060ad' linetype 1 linewidth 2 # _set style line_ defines a set of line types and widths and point types and sizes so that you can refer to them later by an index instead of repeating all the information at each invocation. set border linewidth 1.5 # _set border_ controls the display of the graph borders for the plot and splot commands. The wxt terminal device generates output in a separate window. Set terminal wxt size 400, 250 enhanced font 'Verdana,12' persist # Use _set terminal_ to tell gnuplot what kind of output to generate. Open an editor gedit gnuplot.gnu and type:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |