Handle resizing the window appropriately, which means possibly changing the screen and extent parameters of your view..:For this extension, I created the handleResize() method in display class, which calculates how much the width and height of the window have changed and updates the screen parameters of the view object. The method then updates the axes and data points.
Extend the range of plotting options to 1-5 columns, where selecting 1 column generates a histogram.
: Using 'matplotlib' module and its sub-modules neccesary for embedding plots in tkinter GUI, I was able to generate a histogram based on the user's selection of X-axis. Note that my application, at the moment, does not let the user decide the number of bins for histogram. The codes to generate and display histogram are in handlePlotData() method because I need to know whether the user selected the X-axis only. Figure 8 is the histogram of AustrailiaCost data's longitude.
Implement visualization dimensions other than color and size such as texture or shape.: Note that the first list box in the right control frame contains three different shapes for data points: circle, square, and triangle. The user simply needs to select the shape to display data points in that shape. I made the list box as a field of display class, obtained the user's selection in buildPoints() method, and modified the drawing of data points accordinly. Below are the images (Figure 9) of same data set with different shapes.(Figure 9)
Let the user select or mouse-over a data point and then pop up a window or display the point's raw values in a status bar.: This extension was trickier than my initial thought because I did not store the data object and its raw values together. To access the raw value of a given data point, which I stored in self.objects, I also stored the headers from handleChooseAxes in a field, self.raw_headers. I then called get_value() method of self.data_object with the header and the looping variable as parameters. I implemented this extension in the reportValue() method, which was binded to the mouse motion. I will show an image of this extension altogether with the last extension.
Handle the case where the user wants to have multiple files open.: To enable the user to have multiple files open, I did not create the data object given a filename in handleOpen() method. I rather added the loaded filename to the second listbox, which is self.data_lb. I then create the data object based on the user's selection from the second list box in handlePlotData. The concept of this extension was straightforward; the challenge was to make sure there is no loophole in creating a data object without having the user reading in a data set or choosing the filename from the list box. Because of the size of the list-box, the user can have maximum of 3-files open. If the user wants to read in additional files after opening three, the user can delete one of the entries in the listbox by selecting the entry and clicking the 'Delete' button. The 'Delete' button will remove the selected entry from the listbox and remove the plot if it is already drawn.
Put labels on the axes that stick with them as they rotate/scale/translate: I added X, Y, Z labels that are attached to the corresponding to the axes. They stick with the axes as they rotate/scale/translate. I built and updated theses labels where I built and updated the axes.
Make use of your analysis functions and let the user view data properties like the mean, standard deviaion, and range of selected columns.: Once I create a data object and store the headers in handlePlotData() method, I used analysis class's mean, stdev, and data_range() methods to report the data properties of the selected headers. To report the values dynamically, I created and made text-variables as fields and updated them in handlePlotData(). Note that the data properties and raw value of a data point are reported at the bottom frame of the window. Figure 10 shows the image of reporting the data properties and raw value.
Demo: (demonstrating running display.py)
From this project, I learned how to integrate a basic GUI with a data API that can read in a data set and operate data-analysis and View class API that implements the user-interaction with GUI.