Graphics Reference
In-Depth Information
data and procedures are encapsulated. his paradigm originally appeared in a pro-
gramming language intended for simulation: Simula. he Smalltalk system is a pure
OOP environment and shows that OOP is very useful for building window-type
graphical userinterfaces (GUI)byprovidingwindowframes,pull-downmenus,slid-
ers and buttons. In addition, GUI programming must be event-driven; that is, oper-
ations by users are not sequential, and the program needs to decide on its operations
accordingtoeventscausedbyusers;forexample,theclickingofamousebuttonorthe
selection of an item from a pull-down menu. Statistical data visualization is thought
tobeanadvancedformofGUI.Inadditiontobuttonsandpull-downmenus,itshows
data points or lines on windows to express data or results from analysis.
Java is appropriate for modern data visualization for several reasons. First, it is an
OOP language. Second, it has well-designed standard graphics libraries, such as Java
D and Swing. hese libraries can work as useful components of statistical graphics
and are incorporated by applying so-called “design patterns.”
Design patterns are suggested solutions tocommon problems that oten appear in
OOP work (Gamma et al., ). hey are derived from the experiences of profes-
sional programmers using OOP languages. As they aim for generality and reusabil-
ity, they can appear cumbersome for simple programming. However, when design-
ingreusable libraries that includestatistical graphs, designpatterns providepowerful
guidelines.
In this chapter, we consider how to build a general-purpose statistical graphics li-
brary in Java. We explain the basic ideas associated with a statistical graphics library,
the Java language, and design patterns in the next section. hese ideas are actually
used to build a Java statistical graphics library, Jasplot, in Sect. . Jasplot (JAva Sta-
tistical PLOT) has been developed by adopting design patterns. Sect. contains our
concluding remarks. In the Appendix, we briefly explain how to install and use the
Jasplot library.
Basics of Statistical Graphics Libraries
and Java Programming
17.2
We recommend the use of Java to write statistical graphics programs. We briefly ex-
plainthereasonsforthishere.First,weconsidertherequirementsofstatisticalgraph-
ics libraries. hen we state why Java is suited to achieving these requirements. Intro-
ductions to design patterns and UML class diagrams are also given, because they are
used in the next section.
Required Functions for Statistical Graphics Libraries
17.2.1
Statistical graphics libraries must include at least the following functions. We note
that basic statistical calculation functions are preferable for statistical graphics li-
braries. However, we can leave them to the sotware from which the library is used,
and we do not consider them here.
Search WWH ::




Custom Search