Report 4: Scatter Plot
The fourth and final report for this project is a scatter plot. A scatter plot shows the relationship between two sets of numbers as a series of points. Plotting two datasets is relatively straightforward; the difficult part of this application is making it dynamic so that the user has a choice of multiple values, any of which can be plotted along either axis. Also, the axes are dynamic because each value has a different maximum value. Listing 12.10 is the C code that creates the scatter plot application.
Listing 12.10. scatter_utils.c
#include <gtk/gtk.h> #include <mysql.h> /* stdlib.h is needed for the atoi/atof call. */ #include <stdlib.h> #include "support.h" #define SERVER "einstein" #define LOGIN "com_user" #define ... |
Get MySQL Building User Interfaces now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.