graphics_gnuplot_test, C codes which illustrate how various kinds of data can be displayed and analyzed graphically, using the gnuplot() graphics program.
Some common plot types include:
The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.
graphics_test is available in a C/dislin() version and a C/gnuplot() version and a C++/dislin() version and a C++/gnuplot() version and a FORTRAN90/dislin() version and a FORTRAN90/gnuplot() version and a MATLAB version and an Octave version and a Python version and an R version.
dislin_test, C codes which use dislin(), which is a scientific graphics package, by Helmut Michels.
gnuplot_test, C codes which write data and command files so that the gnuplot() program can create plots of the results.
album_bar lists the year, and total number of music albums (LP's, cassettes, CD's and dowloads) sold each year from 2007 to 2017. This data is plotted as a bar graph. The gnuplot() program is used.
automobile_scatter contains prices and weights of cars available in 1985. A scatter plot is to be made. The gnuplot() program is used.
brownian_2d_plot plots data representing 1000 steps of Brownian motion in two dimensions. Unlike a typical y=f(x) plot, this data wanders around the page. The gnuplot() program is used.
bulgaria_plot takes data about the Bulgarian population over time and makes a plot of (time,population). The gnuplot() program is used.
caffeine_scatter seeks a relationship between the percentage of blindness due to cataracts, and the daily intake of caffeine, in a number of countries. A scatter plot is produced. The gnuplot() program is used.
corkscrew_plot3d generates (X,Y,Z) points that lie along a 3D curve looking something like a corkscrew. The gnuplot() program is used.
corvette_scatter considers the resale price for Corvettes by model year, displaying the results as a scatter plot. The gnuplot() program is used.
drug_dosage_plots depicts measurements over 48 hours of the blood level concentration of a medicinal drug. The drug needs to reach a certain level to have an effect, but must not exceed the toxic level. A graphic is created which shows, on one plot, the concentration over time, the minimal effective level, and the maximum nonlethal leval. The gnuplot() program is used.
geyser_histogram contains the waiting time in minutes between successive eruptions of the Old Faithful geyser. The gnuplot() program is used.
geyser_scatter looks for relations between the duration in minutes of the eruption and following waiting times for the Old Faithful geyser. The gnuplot() program is used.
insect_scatter3d involves 3 data sets, each containing 10 measurements of 3 quantities for each of 3 species of insect. The quantities are first tarsus width, second tarsus width, and maximum width of the aedeagus. It is of interest to know whether these three measurements are enough to differentiate between members of the three species. A 3D scatter plot is created. The gnuplot() program is used.
least_squares_plots compares 15 pairs of (x,y) data, the least squares line that approximates their behavior, and a quadratic curve that is much closer to the data. The gnuplot() program is used.
mario_fill makes a simple image of Mario, by constructing a grid of squares filled with color. The gnuplot() program is used.
nile_histogram makes a histogram of the yearly measurement of the height of the Nile at maximum flood. By lumping the data into bins, it is easier to see the range of flood heights, and the probability of various values in the range. The gnuplot() program is used.
nile_plot makes a line plot of the yearly measurement of the height of the Nile at maximum flood. The gnuplot() program is used.
ninety_histogram considers 90 numeric values. We create a histogram, to see how the data spreads out across its range. We spot outliers as histogram bins of low occupancy that are far from the rest of the data. The gnuplot() program is used.
predator_plot3d models the populations of predators (foxes) and prey (rabbits) over time. A 3D plot of (time, rabbits, foxes) is created. The gnuplot() program is used.
president_heights_bar plots the heights of US presidents in inches, as a bar plot. The gnuplot() program is used.
president_heights_histogram plots the heights of US presidents in inches, as a histogram. By grouping the data by height, we lose the ability to identify specific cases, but we are better able to see the range of heights, and to judge the frequency of various heights. The gnuplot() program is used.
price_plots reads a table of average monthly prices for 11 consumer products, between February 2008 and February 2018, as compiled by the Bureau of Labor Statistics, and plots together the prices of three of the items. The gnuplot() program is used.
snowfall_histogram makes a histogram of the yearly snowfall totals at Michigan Tech from 1890 to 2017. The gnuplot() program is used.
snowfall_plot makes a line plot of the snowfall at Michigan Tech from 1890 to 2017. The gnuplot() program is used.
temperature_scatter shows locations in the US where the January temperature was recorded. The gnuplot() program is used.
temperature_scatter3d shows temperatures and locations in the US where the January temperature was recorded. The gnuplot() program is used.
track_bar considers an eye-tracking experiment in which the eye was focused on different regions for different durations. Each region has a text label. A bar graph is desired, in which the bar for each duration is given the appropriate label. The gnuplot() program is used.