Automatic plotting with Python

Below is a sample Pyhton script to automatically plot a generic data file using matplotlib. It will automatically read an arbitrary number of datasets from a file and plot each as a separate line in a matplotlib plot. Usage python3 input_data_filename output_filename [plot_title [y_axis_label]] The first argument is the name of the file containing

gnuplot revisited

Here is a more sophisticated example of using gnuplot: set terminal png size 1920, 1080 enhanced font ‘Verdana,15’ # Different log scales set logscale x 2 set logscale y 10 # %L is the exponent of the current log scale set format y “%g” set format x “2e%L” # Move the legend to the top

A simple gnuplot example

gnuplot is a very easy-to-use tool allowing us to quickly plot data we generated with, for instance, a C++ program. Here is a sample gnuplot script – see a brief explanation of the commands below: set terminal png size 900,675 enhanced font ‘Verdana,9’; set output ‘error_plot.png’; set logscale xy; show logscale; set format xy “%g”;