0% found this document useful (0 votes)
19 views1 page

GNUplot Practice Problems for Students

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

GNUplot Practice Problems for Students

Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

GNUplot – Practice Problem Set

This problem set is designed for undergraduate physics and science students to practice data
visualization and function plotting using GNUplot.

Section A: Basic Plotting


1 Plot y = x, y = x², and y = x³ on the same graph for x ranging from −5 to 5.
2 Plot sin(x), cos(x), and tan(x) on separate graphs in the range 0 to 2π.
3 Change the title, x-label, and y-label of a plot of y = e^(−x).
4 Plot y = log(x) for x > 0 and set appropriate axis ranges.
5 Use different line styles and colors to plot y = x² and y = x³ together.

Section B: Data File Plotting


1 Create a data file with two columns: x and y = x². Plot the data using GNUplot.
2 Plot a data file containing experimental values of time and displacement.
3 Plot multiple data sets from the same file using different columns.
4 Add error bars to a plot using a three-column data file.
5 Fit a straight line to a given data file and display the fitting parameters.

Section C: Advanced Plotting


1 Plot a parametric curve: x = cos(t), y = sin(t).
2 Generate a 3D surface plot of z = sin(x² + y²).
3 Use contour plotting for z = x² + y².
4 Create a histogram from a data file.
5 Plot a function using logarithmic scales on both axes.

Section D: Output and Customization


1 Export a plot as a PNG image with high resolution.
2 Save a plot as a PDF suitable for publication.
3 Add legends and position them manually.
4 Use multiplot to display two graphs in the same figure.
5 Customize font size and style for titles and labels.

You might also like