CC Data Visualization Library
Total Page:16
File Type:pdf, Size:1020Kb
CC Data Visualization Library: Visualizing large amounts of scientific data through interactive graph widgets on ordinary workstations Master of Science Thesis in the programmes Interaction Design & Algorithms, Languages and Logic MAX OCKLIND ERIK WIKLUND Chalmers University of Technology Department of Computer Science and Engineering Göteborg, Sweden, May 2012 The Authors grant to Chalmers University of Technology the non-exclusive right to publish the Work electronically and in a non-commercial purpose make it accessible on the Internet. The Authors warrant that they are the authors to the Work, and warrant that the Work does not contain text, pictures or other material that violates copyright law. The Authors shall, when transferring the rights of the Work to a third party (for example a publisher or a company), acknowledge the third party about this agreement. If the Authors have signed a copyright agreement with a third party regarding the Work, the Authors warrant hereby that they have obtained any necessary permission from this third party to let Chalmers University of Technology store the Work electronically and make it accessible on the Internet. CC Data Visualization Library: Visualizing large amounts of scientific data through interactive graph widgets on ordinary workstations MAX OCKLIND ERIK WIKLUND © MAX OCKLIND, May 2012. © ERIK WIKLUND, May 2012. Examiner: Olof Torgersson Chalmers University of Technology Department of Computer Science and Engineering SE-412 96 Göteborg Sweden Telephone + 46 (0)31-772 1000 Cover: The GUI of the CCDVL library during a test run, showing a scatter plot graph of sample data with a lasso selection overlay. Sections 4.2.3 FRONTEND AND GUI ANALYSIS AND DESIGN and 4.3.3 FRONTEND AND GUI IMPLEMENTATION as well as APPENDIX B - MANUAL AND USER GUIDE contains detailed descriptions of the GUI and frontend. Department of Computer Science and Engineering Göteborg, Sweden May 2012 i Abstract A big problem today is that there are currently few or no solutions available for workstations that are able to provide both good interactivity and fast response times while visualizing large amounts of data. Using existing solutions often cause crashes or freezes due to the assumption that all data will fit in main memory and can be processed as such. The purpose of this thesis was thus to simplify analysis of large amounts of scientific data by creating a small modular and extensible cross-platform graphics library, intended to run on ordinary workstations, capable of handling such data and present it through highly interactive plot graph widgets. Focus was on basic functionality for two-dimensional graphs, namely scatter plot graphs and time series graphs. The created library implements a memory manager that avoids keeping too much data in memory by controlling and partially storing and loading data to and from a temporary file and the main memory as needed. A clipmap-like structure is used to display the graph, and a cache of clipmap image tiles is used in combination with progressive updates to improve performance and responsiveness. Insufficient planning forced some of the functionality and requirements to be dropped, which left room for much improvement, as well as a lot of possible out of scope additions and extensions, such as better utilization of the cache, supporting groups of selected data points, logarithmic scaling, and improvements to the memory manager, renderer and GUI. Comparing the results of a simple review and tests of some existing data visualization libraries it was found that the used renderer had average performance, although it had problems using very large or many clipmap image tiles. The resulting library may not be faster than many existing libraries, but it allows faster interaction with good tile configurations and stands out in that it also allows interaction during loading of data and graph updates, while normally avoid consuming all system resources. Its potential is promising, as it thus allows for faster extraction of interesting portions of the data, giving it many possible applications within several areas. Keywords Algorithms, Data points, Design, Human-computer interaction, Information visualization, Large data visualization, Memory management, Scatter plot, Time series plot, User interface ii Acknowledgements The authors would like to thank Olof Torgersson, the supervisor and examiner at Chalmers, for his support and feedback throughout the thesis work; Peter Karlsson and Alexander Busck at Combine for their encouragement and inspiring vision; Stefan Larsson at Volvo Car Corporation for his great insight and advice regarding graphs and plotting interfaces; and last, but not least, the authors would like to thank all family and friends for their support. iii Table of contents 1 INTRODUCTION .................................................................................................. 1 1.1 BACKGROUND .................................................................................................................. 1 1.2 PROBLEM .......................................................................................................................... 2 1.3 PURPOSE ........................................................................................................................... 2 1.4 DELIMITATIONS ................................................................................................................ 2 2 THEORY ................................................................................................................. 3 2.1 OPERATING SYSTEM MEMORY MANAGEMENT ................................................................. 3 2.1.1 Virtual memory, swap and memory leaks ................................................................ 3 2.2 ALGORITHMIC PROBLEMS ................................................................................................ 5 2.2.1 Algorithms ............................................................................................................... 5 2.2.1.1 Algorithm complexity analysis ........................................................................................ 5 2.2.1.2 Polynomial problems ....................................................................................................... 7 2.2.1.3 Nondeterministic polynomial problems ........................................................................... 7 2.2.1.4 Other complexity classes ................................................................................................. 8 2.2.2 Binary search .......................................................................................................... 9 2.2.3 Cache ....................................................................................................................... 9 2.2.4 Point in polygon ...................................................................................................... 9 2.3 CONCURRENT PROGRAMING AND MULTIPROCESSING ................................................... 12 2.4 SOFTWARE ENGINEERING DESIGN PATTERNS ................................................................. 13 2.4.1 Observer ................................................................................................................ 13 2.4.2 Visitor and double dispatch ................................................................................... 13 2.4.3 Iterator ................................................................................................................... 13 2.4.4 Readers-writer lock ............................................................................................... 14 2.4.5 Message queue ...................................................................................................... 14 2.5 HUMAN-COMPUTER INTERACTION ................................................................................. 14 2.6 INFORMATION VISUALIZATION ....................................................................................... 15 2.6.1 Examples of information visualization .................................................................. 16 2.6.2 Representation ....................................................................................................... 19 2.6.2.1 Data types and data complexity ..................................................................................... 19 2.6.2.2 Data encoding methods and guidelines .......................................................................... 22 2.6.3 Presentation of represented data ........................................................................... 25 2.6.3.1 Display limitation techniques ........................................................................................ 25 2.6.3.2 Time limitation techniques ............................................................................................ 26 2.6.4 Interaction with presented data ............................................................................. 27 2.6.4.1 Exploration and insight through interaction ................................................................... 27 2.6.4.2 Information spaces and types of interactions ................................................................. 28 2.6.4.3 The Action Cycle and human aspects of interaction ...................................................... 28 2.7 GRAPHICAL USER INTERFACE ........................................................................................ 30 2.7.1 User type and application posture .......................................................................