ON THE VISUALIZATION IN

A THESIS SUBMITTED TO THE ISLAMIA UNIVERSITY OF BAHAWALPUR IN THE SUBJECT OF STATISTICS FOR THE DEGREE OF DOCTOR OF PHILOSOPHY

By SABRA SULTANA October 2011

Department of Statistics

Bahawalpur 63100, PAKISTAN www.iub.edu.pk

Chapter 1 Introduction

1.1 Visualization and Its Importance

It has been noted years ago that visualization is the foundation for human understanding. Since the beginning of recorded history, human beings have seen images in natural wonders. Objects such as stars, rock formations, and clouds were being more easily explained through visualization. The sayings (i) “Seeing is believing”, (ii) “One picture is worth ten thousand words” and (iii) “A good sketch is better than a long speech” are true everywhere and in statistics have no exception. Visualization is an emerging field that has an important role to play in statistics. Playfair (1801) expressed, “For no study is less alluring or more dry and tedious than statistics unless the mind and imagination are set to work or that the person studying is particularly interested in the subject; which is seldom the case with men in any rank in life.”

Data visualization is used to (i) present data in a summarized form, (ii) analyze large amounts of data to see patterns, trends, correlations, etc., (iii) get insights of the data to make decisions. Data visualization is very popular in business fields and considered to be necessary for the growth of business. Data recorded in or surveys is to be displayed by a statistical graph for visualization. Usually, they are classified into different types such as Pictograph, Line Plot, , , Bar Graph, Line Graph, Polygon, , Stem and Leaf Plot, and etc. The choice of the tools are related with the type of the data and the questions being asked. Schmid (1954) suggested the following three basic purposes for charts and graphs.

(i) Illustration,

(ii) Analysis, and

(iii) Computation.

Tukey (1972) suggested the following three categories of graphs.

(i) Propaganda graphs,

(ii) Analytical graphs, and

(iii) Substitute of tables.

Another category “Graphs for decoration” was added to Tukey’s categories by Tufte (1976).

According to Friedman (2008), “The main goal of visualization is its ability to visualize data, communicating information clearly and effectively through graphical . It doesn’t that data visualization needs to look boring to be functional or extremely sophisticated to look beautiful. To convey ideas effectively, both aesthetic form and functionality need to go hand in hand, providing insights into a rather sparse and complex data set by communicating its key-aspects in a more intuitive way.” Graphical methods play a key role in the development of and practice. Graphics provide an excellent approach for exploring data and are essential for presenting results. The graphics are divided into following two types.

(i) Presentation graphics, and

(ii) Exploratory graphics.

2

Anscombe (1973) explained that when fitting a function to data, first, we must plot the data. He invented four data sets to demonstrate the importance of graphing the data before fitting lines of regression. Collectively these datasets present a very striking picture. Graphs are also a fundamental part of the confirmatory analysis for . Graphical visualization has gained such importance nowadays that ASA publishes a separate journal; Journal of Computational and Graphical Statistics. With the rise of computer graphics capabilities, the work of pioneers of graphical statistics such as Tukey, Cleveland, and Tufte has been combined, resulting in many high-end scientific visualization systems. Chambers et al. (1983) stated, “There is no single statistical tool that is as powerful as a well-chosen graph.”

A visually intuitive approach has now been given to statistical data analysis. Visual Statistics through ViSta (The Visual Statistics System) has brought complex and advanced statistical methods within the approach of even less skilled users of statistics. Full interactive visualizations from relevant , promoting perceptual and cognitive understanding of the data's story has been made available by ViSta. Thus emphasis should be placed on a paradigm for understanding data that is visual, intuitive, geometric and active, rather than one that relies on convoluted logic, heavy mathematics, and systems of algebraic equations or passive acceptance of results.

1.2 Problem Statement

The recent age is of multivariate data sets which should be analyzed in a limited time. Data visualization provides quick and reliable results. To make the data visualization more effective, new graphical forms for presentation and comparison of multivariate data sets should be developed. But unfortunately, the existing graphs are not in generalized forms. Some of these graphs are just subjective in nature.

3 1.3 Research Questions

Based on the indicated problems, the current study is indented to find answers for the some following questions.

 Whether the existing graphical forms should be improved or the new graphical forms should be developed for this purpose?    To increase the scope of graphs, should the new graphs be in generalized and objective forms?   Which type of new graphical forms can adequately present and compare the multivariate data set?

1.4 Research Objectives

Objectives of the present study are to:

 Introduce new graphical forms for presentation and comparison of multivariate data sets.   Create the new graphs in generalized forms because they increase the scope and will be more useful.   Develop new graphical forms which should be objective in nature.    Present the new graphical forms in different colors to make them aesthetically pleasing so that they may enhance the interest of the viewers.

4 1.5 Organization of the Thesis

 Chapter 1: It comprises on the introduction of the comprehensive domain of the study, the problem statement, research questions, and objectives.    Chapter 2: It deals with the detailed history of graphical presentation.     Chapter 3: It deals with the extensive literature.    Chapter 4: It contains (a) a new visualization of LSD test which is (i) objective in nature, and (ii) self-explanatory at a glance. (b) a comparison of proposed visualization of LSD with that of Iqbal and Clarke (2003b).    Chapter 5: It presents the generalized form of Multi-Series Doughnut charts. For marginal cases, more sophisticated way of visualization are also considered.   Chapter 6: It deals with the creation of a generalized form of Bar Charts which make the representation and comparison of multivariate data sets possible at a time.    Chapter 7: It deals with the exploration of the generalized form of Boxes which make comparison of multivariate data sets possible for more than three dimensions.   Chapter 8: It is based on the summary of the study and directions for future research.

5

Chapter 2

History of Data Visualization

Statistical graphics and data visualization are modern developments in statistics. The pedigree of graphical portrayal of quantitative information can be found in ancient map- making, thematic , medicine, and science. Visualization took its birth in geometric diagrams, in tables of the positions of stars and other celestial bodies, and in the map making.

Figure 2.1 illustrates the graphical overview of the distinctive periods of time (strictly from 1500 to 2000) with the frequency of events which have taken as milestones in the history. It depicts the steady rise up from the early 18th century, to the 19th century, followed by a decline in the period of modern dark ages. After that, a sudden rise up to the present age has been shown.

6

Figure 2.1 Time Distribution of Events Considered Milestones in the History of Data Visualization, Shown By a Rug Plot and Density Estimate. Source: Chen et al. (2008, p.18)

Funkhouser (1936) presented one of the oldest graphical representations (see Figure 2.2) dating back to the 10th century which is related to the changing positions of the seven important heavenly bodies and after that Tufte (1983, p. 28) reproduced it. Figure 2.2 is a multiple time-series graph showing changing position of seven heavenly bodies over space and time. Time (divided into 30 intervals) is taken up along the horizontal axis and the vertical axis shows the inclination of the planetary orbits.

Statistical graphics and data visualization have deep roots which reach into the past studies of the earliest map-making, visual depiction and later into cartography. The Egyptian surveyors used the concept of the coordinates by at least 200 B.C. A memorable work at that time was the map projection of spherical earth into longitude and latitude.

During the 14th century, the idea of plotting a theoretical function and the logical relation between tabulating values and plotting them appeared. In the 15th century, Nicole Oresme (1482) gave the basis for the idea of a theoretical graph of distance vs speed.

7

Figure 2.2 Planetary Movements shown as Cyclic Inclinations over Time. Source: Chen et al. (2008, p. 19)

In the 16th century, different techniques for exact observations and measurement of physical quantities were suggested and for that tools were developed. Reginer Gemma- Frisius (1533) used camera obscure to record an eclipse of the sun. Some other prominent contributions were basic trigonometric tables and the first cartographic atlas.

Early in the 17th century, a remarkable example (Figure 2.3) shows 1644 graphics by Michael Florent van Langren. It is believed to be the first visual representation of statistical data (Tufte, 1997, p. 15). This Figure 2.3 is a 1-D line graph to show the distance between Toledo and Rome in longitude. According to Friendly & Kwan (2003), ‘‘Van Langren’s graph is also a milestone as the earliest known exemplar of the principle of effect ordering for data display”.

8

This century saw new directions in theory and practical application, the rise of coordinate systems and analytic geometry, the analysis of observations, the foundation of probability theory, and political arithmetic.

Figure 2.3 Langren’s 1644 Graph of Determinations of the Distance, in Longitude, From Toledo to Rome. Source: Chen et al. (2008, p. 21)

John Graunt (1662) and William Petty (1665) laid foundations of systematic collection and study of social data. Jan de Witt (1671) worked for insurance and amount of premium based on life tables. A significant work of the first graph of a continuous distribution function using the idea of coordinate systems was also considered. The first bivariate plot presented by Edmund Halley (1686), is known as the first weather map.

In the 18th century, graphic representation was noticed and it progressed with the passage of time. Isolines and contours were introduced by Edmund Halley (1701) for the presentation of data in the field of cartography (see Figure 2.4). Figure 2.4 illustrates isogons (lines of equal magnetic declination).

Thematic mapping of geologic, economic and medical data was also started near the end of the 18th century. Philippe Buache (1752) and Marcellin du Carla- Boniface (1782) developed contour maps and topographic maps. Joseph Priestley (1765) independently presented timelines chart. Squares, rectangles, superimposed squares, and cartograms were introduced for comparison of areas. By the end of the 18th century, lithography and three-color printing

9 had been developed. The ideas of curve fitting and interpolation from empirical data points were also presented in the field of new graphical forms.

Figure 2.4 A Portion of Edmund Halley’s New and Correct Sea Chart Showing the Variations in the Compass in the Western and Southern Ocean, 1701. Source: Chen et al. (2008, p. 23)

William Playfair (1786, 1801) invented most of the graphical form- the line graph, , pie charts, and circle graph. Figure 2.5 is redrawn from Playfair (1801) which is a creative combination of circles, pies, and lines to show taxes per capita of a number of nations. Left axis and line on each circle are used to show . Right axis and line show taxes.

10

.

Figure 2.5 Redrawn Version of a Portion of Playfair’s 1801 Pie-Circle-Line Chart, Comparing Population and Taxes in Several Nations. Source: Chen et al. (2008, p. 24)

Playfair (1821) presented a graph (see Figure 2.6), which is considered to be the best of his work. In Figure 2.6, he showed three parallel showing the price of wheat, weekly wages and a reigning ruler over a period of 250 years from 1565-1820. He showed that workers had become better off in the recent years.

In the 1790s, the use of graphs in scientific applications was also noted. Howard (1800) presented the first known graph by using coordinate paper for periodic variation in barometric pressure.

11

Figure2.6 William Playfair’s 1821 Time Series graph of Prices, Wages and Reigning Ruler over a 250-Year Period.

In the beginning of the 19th century, bar and pie charts, , line graphs, time-series plots, contour plots and scatter plots had been developed. Comprehensive atlases were presented in the field of thematic cartography. Many scientific publications started using the graphical analysis of different phenomena. William Smith (1815) introduced the first geological maps, which opened new ways in the field of geological cartography. Baron Charles Dupin (1826) introduced the use of continuous shadings. In the 1830s, foundations of modern social science were laid. Dr. John Snow (1855) by his famous dot map (see Figure 2.7) showed the deaths due to water-borne cause of cholera around the Board Street pump in Great Britain in October 1831. This was a landmark in the history of graphic discovery.

12

Figure 2.7 Dr. John Snow’s (1855) Map.

Dr. Robert Baker (1833) presented the first known disease map (see Figure 2.8). He depicted the affected districts of Leeds by cholera in 1832 outbreak. The dark line shows the districts in which cholera was spread. He showed the association between the disease and the lack of living conditions (sewage, drainage, and paving).

13

Figure 2.8 A Portion of Dr. Robert Baker’s Cholera Map of Leeds, 1833, showing the Districts Affected by Cholera.

Charles Joseph Minard (1844) used graphs in official circles for economic and state planning. Funkhouser (1937) called him “the Playfair of France”. Friendly (2000) gives a wider appreciation of Minard’s work and called Minard ‘a true visual engineer’. After the mid-1800s, the boom of visualization started. Official state statistical offices were opened to collect numerical information for the development of the state.

14

Although some attempts to display more than two variables simultaneously had occurred earlier in multiple time series (Playfair, 1801), contour graphs showing isolevel curves of 3-D surfaces (Halley, 1701). But application and expansion were done after the 1850s. Edwin Abbott (1884) suggested possible views in four or more dimensions.

New graphical forms were invented to cope with complex data and phenomena. Minard (1861) used divided circle diagrams and flow lines on maps. Flow maps reached its highest level in his famous depiction of the fate of the armies of Napoleon and Hannibal. Tufte (1983) called it the ‘best graphic ever produced’.

Florence Nightingale (1857) invented rose diagrams or coxcombs (see Figure 2.9), which show the use of graphics in social and political areas. In Figure 2.9, the areas of the blue, red and black wedges each measured from the center as the common vertex. The blue wedge measured from the center of the circle represents deaths from preventable diseases, the red wedge measured from the center of the circle represents the deaths from wounds and the black wedge measured from the center of the circle represents the deaths from all other causes. She showed that many more deaths of soldiers were from disease and consequences of wounds than at the hands of the enemy. She launched a campaign to improve sanitary conditions in battlefield treatment of soldiers.

New forms and modifications of scales and shapes for graphs were made which resulted in semi-logarithmic graphs by Jevons (1863, 1879) to show the percentage change in commodities over time. Prominent works were log-log plots to show multiplicative relations, anamorphic maps and alignment diagrams or nomograms using sets of parallel axes.

Francis Galton (1886, 1894) is well-known for the ideas of correlation and regression but the role that visualization and graphing played in his discoveries is less known. This work repaid him in his contributions and discoveries, which were mainly due to visual analysis of his data.

15

Figure 2.9 Florence Nightingale’s Rose Diagrams

He used isolines, contour diagrams and smoothing. He presented an isochronic chart to show the time to cover the distance to any place in the world from London. He used ‘isogens’ to analyze the rates of fertility. His work on weather patterns was summarized in Meteorographica. His prominent chart of the Trellis-style display (see Figure 2.10) shows observations on barometric pressure, wind direction, rain and temperature from 15 days in December 1861 of Europe. This Figure 2.10 is a 3*3 grid in which1st row shows mapping pressure, 2nd shows wind and rain, and 3rd shows temperature. It shows the anticlockwise pattern of winds around low-pressure regions, combined with clockwise rotations around high-pressure regions.

16

Figure 2.10 One Page of Galton’s Multivariate weather Chart of Europe showing Barometric Pressure, Wind direction, Rain, and Temperature.

Official government statistics about state affairs became widespread in most of the European countries during 1825 to 1870. Reports with data graphics published regularly in France, Germany, Hungary and Finland, and with tabular displays in Sweden, Holland, and Italy. International Statistical Congresses began in 1853 in Belgium were organized for the development of the graphical presentation.

17

The French ministry of public works annually published statistical albums ‘The Albums de Statistique Graphique’ from 1879 to 1897.The Albums used all the known graphical methods of that time e.g. variants of pie and circle diagrams, star plots, rose diagrams and flow maps. Friendly (1994) used subdivided squares in the style of modern mosaic displays. One of the other famous statistical albums and atlases is from the US Bureau. The Statistical Atlas of the Ninth Census was produced in 1872-1874. The aim of this atlas was to graphically represent the features of the nation. The volumes of 1880 and 1890 are important due to the multimodal combination of different graphic forms (tables, maps and bar charts etc). Friendly & Kwan (2003) used effect order sorting to arrange states or other categories. For example, Figure 2.11 shows interstate immigration and emigration between the 49 states and territories in 1890. The right side (of Figure 2.11) shows population loss due to emigration, ranging from New York, Ohio, Pennsylvania and Illinois at the top to Idaho, Wyoming and Arizona at the bottom. The left side shows where the emigrants went: Illinois, Missouri, Kansas and Texas had the biggest gains. Virginia had the biggest net loss.

Figure 2.11 Interstate Migrations shown by Back-to-back Bar Charts, Sorted by Emigration.

18

The next volume of ‘The Statistical Atlas’ contained more than 400 graphs. After this peak, there started a decline in this field. French Albums de Statistique Graphique were discontinued in 1897 due to the high cost of production. Statistical atlases appeared in Switzerland in 1897 and 1914 but never again. The final two US census atlases, issued after 1910 and 1920 , were routinized productions, largely without color and graphic imagination. Friendly & Denis (2000) called the late 1800s the “golden age” of statistical graphics and thematic cartography and the early 1900s the “modern dark ages” of visualization because no remarkable work was noticed. By the mid-1930s, only the work in the quantification and formal models in the social sciences were noticed. But this time can be studied for necessary dormancy, application, and popularization. Statistical graphics became mainstream. Graphical methods became part of English textbooks, the curriculum, and standard use in government, commerce and science. Arthur Bowley’s (1901) ‘Elements of Statistics’ dedicated two chapters to graphs and diagrams. His example of smoothing (see Figure 2.12) illustrates the character of his approach. In the Figure 2.12, he plotted the total value of exports from Britain and Ireland over the period 1855-1899 by three-time series of over 3-, 5- and 10-year periods around averages of successive 10-year periods starting 1859.

Figure 2.12 Arthur Bowley’s Demonstration of Different Methods of Smoothing a Time series Graph

19

Graphical methods were also proved essential in a number of new discoveries and theories in biology, physics, astronomy and other sciences e.g. ‘butterfly diagram’ for studying the variation of sunspots over time, use of log-log plot in planetary physics. The discovery of the concept of atomic number by Henry Moseley (1913) was mainly based on graphical analysis. Friendly & Denis (2005) gave a full account of uses of graphical forms. Different graphical forms were compared. In 1914, Joint Committee on Standards for Graphic Presentation decided standards and rules for graphic presentation and developed a lot of practical aids to graphing.

John W. Tukey (1962) in his remarkable paper ‘The Future of Data Analysis’ issued a call for the identification of data analysis as a proper branch of Statistics different from Mathematical Statistics. After some time, Tukey (1977) invented a wide variety of new, simple and effective graphical displays (in EDA) such as stem-leaf plots, box plots, hanging root grams and two-way table displays, etc. His work was purposely hand-drawn. These inventions got a place in statistical terminology and software execution. His work made graphical data analysis again interesting and respectable.

Visual and perceptual elements of graphics were organized according to the features and relations in data. An investigative and graphical approach was provided to multidimensional data, which gave a new visually based vision of statistics to in France and Europe. Meanwhile, graphically minded schools of data thought were opened in the Netherlands (Gifi), Germany and Europe.

Proficiency of hand-drawn maps and graphics was lost during 1900-1950. With the advancement in computer technology, it has become possible to construct new as well as old graphic forms using computer programs. New computer science research at Bell Laboratories and elsewhere may provide new bases and ways for expressing data. These developments will set new dimensions for future.

20

Chapter 3 Literature Review

3.1 Box Plot and its Extensions

Emphasis had been started to be given to graphics in presenting statistical data and results as far back in the seventies when Tukey (1970, 1977) introduced the marvelous idea of Box Plot which was initially used to display batches of data. The lower and upper extremes, the lower and upper hinges (quartiles) and the , these five values are the basic parts of the Box Plot. These plots became popular and were being used in graphical exploratory data analysis and in preparing visual summaries of raw data as well as results.

McGill et al. (1978) suggested three variants of Box Plot, (a) Variable- Width Box Plot, (b) Notched Box Plot, and (c) Variable-Width Notched Box Plot. In the first variant, usage of the size of the group was introduced where the width of the box was made proportionate to the square root of the size of the corresponding group. This modified form was known as “Variable- width box plot”. While in the second variant, the modification was done to show the rough significance of differences between . For this purpose, confidence intervals around medians (notches) were constructed. This modified form of box plot was 21 named “Notched box plot”. In the third variant, the above two modifications were made simultaneously applicable in one display. This modified form was named “Variable-width notched box plot”. These modifications were much appealing and inspiring for statisticians and opened new ways to think like in this stream of exploration.

Andrews et al. (1980) applied the idea of “Notched box plot” to means. They used the Least Significant Interval (LSI) and Honest Significant Interval (HSI) to construct uncertainty intervals about means. Density trace was described by Chambers et al. (1983). These resulting plots were named “Violin plots”. The provides a useful tool for data analysis and exploration. It allows quick and insightful comparison of several distributions. The density trace highlights the peaks, valleys, and clusters in the distribution. So violin plot provides a better indication of the shape of the distribution. Tufte (1983) presented an alternative of a Box Plot and named it Stripped Plot. He replaced the box by two lines (or strips) parted from each other at the position of the median. He also replaced hinges by lines. His principle to maximize "data-ink ratio" is used to eliminate the charts junk. Tukey and his collaborators continued working on the subject with the similar spirit.

Benjamini (1988) suggested to use ‘original box plot’ and rejected the ‘stripped plot’ presented by Tufte (1983). Benjamini (1988) proposed a modified form of the basic box plot by adding density information to it. The sides of the box were used to represent density information about the data. Two methods of estimating density were used. In the first method, the densities at the median and at the quartiles were estimated from a histogram with a small number of bins. The top, bottom and median lines of the box are made proportional to the estimated density and are joined by straight lines. This plot is called a “Histplot” as it is a hybrid of a histogram and a box plot. The second method of was kernel estimation. The resulting plot is called “Vaseplot” as the box is replaced by vase like shape. Hintze and Nelson (1998) also proposed another modification of the box plot based on the idea of Benjamini (1988). A combination of the box plot and the density trace (or smoothed histogram) in a single display which was used to reveal structure found within the data.

22

Tukey and his friends were also working on the new lines and the thoughts took new forms which were presented in Rousseeuw et al. (1999). They extended the idea of Box Plot (Tukey, 1977) from univariate data to bivariate data, and named it “The : A bivariate Box Plot”. The box plot is based on ranks. For this purpose, half space location depth of a point relative to a bivariate data set is considered. First, the depth median is taken. A ‘bag’ which contains 50% of the data points is constructed. Then a fence is constructed to show separation between inliers and outliers. The fence is obtained by inflating the bag by a factor

3. A loop around the bag is plotted which contains data points that are outside the bag but inside the fence. The Bagplot shows the location, spread, , correlation, and tails of the data. If the bivariate data is very "flat" then the bag becomes a box. The loop plays the role of two whiskers in one dimension. Then it could be called "Bag-and-bolster plot (analogous with the term Box-and-whisker plot). The idea of Notched box plot (McGill et al., 1978) is also extended by incorporating a confidence region for the depth median into the Bagplot, which is called a blotch (Rousseeuw et al., 1999). The resulting Bagplot is called “Blotched Bagplot”. The work on these lines is in progress.

Because of popularity and usage of a box plot and its variants, many computational packages accommodated them. Frigge et al. (1989) discussed implementations of the box plot, which vary from package to package. These variations were because of different choices in the computation of quartiles and fences. Their proposed suggestion that the whiskers length be 1.5 times the interquartile is now commonly used. Choonpradub and McNeil (2005) improved box plot by incorporating a new method to show bimodality, central peakedness, and skewness. They pointed out that previous attempts to show shape information in the box plot have not become popular because:

(i) The inclusion of shape information makes the graph more convoluted and more difficult to interpret.

(ii) Shape variations depend on density estimation which requires an additional smoothness parameter to be estimated.

(iii) Too much shape information can mislead viewers and lead to wrong conclusions.

23

They suggested a slight enhancement to show bimodality in the box plot by thickening the ends of the box denoting quartiles, to show central peakedness by thickening the dividing line denoting median, and to show skewness by thickening just one end of the box. Representation of multidimensional data, by symbols is popular. Commonly used symbols are glyphs, profiles, star plots, function-plots, Chernoff faces (Chernoff; 1973), boxes (Hartigan; 1975), and Trees and castles (Kleiner and Hartigan; 1981).

3.2 Variations and Improvements in Scatterplots

The scatterplot is one of the most powerful graphical tools for data analysis. Cleveland and McGill (1984b) suggested that faceless scatterplots can be made better by adding "faces of sorts". They suggested following graphical additions (a) Sunflowers, (b) Coding Categories,

(c) Point cloud sizing, (d) Smoothing scatterplots. “Sunflowers are a type of two-dimensional histogram which provides us with a portrayal of the count of points. It is the of solution overlapping problem in scatterplots that is often ignored in statistical graphics software. The second addition is Coding Categories. If points on scatter plots fall into two or more categories, then to show categories and to see how the relationship between the variables changes as the category changes, a method “Coding Categories” is developed. In this method letters are used to represent categories. Plotting symbols are also used but they destroy their visual distinguishing ability because of overlapping. Also colors are used for coding categories because they provide best visual discrimination in case of overlapping. Point cloud size is used to observe the nature and amount of association between the two variables in scatterplots. They suggested controlling the point cloud size. Cloud should not be too close to the frame or too far from it. In the case of outliers, they suggested to make two scatterplots, with and without outliers. They suggested adding "smoothing", whose purpose is to graphically summarize the distribution of a factor for a given response. Middle smoothing, residuals smoothing, spread smoothing and, upper and lower smoothing are introduced for this addition. The purpose of the middle, upper and lower smoothing is the same as that of the box portion of box plot (Tukey, 1977). They recommended pairs of middle smoothing,

24 sum-difference smoothing, line smoothing, spread -ratio smoothing and polar smoothing to graphically summarize the bivariate distribution of two variables.

Chambers et al. (1983) gave the idea of "Scatterplots matrix" which shows all pair-wise scatter plots of the variables. Becker and Cleveland (1987) introduced "Brushing scatterplots matrix" which is a collection of new dynamic graphical methods for analyzing data in two, three and higher dimensions. Brushing has four basic operations (i) highlight, (ii) shadow light, (iii) delete, and (iv) label. Each operation is carried out in one of the three modes (a) transient, (b) lasting and (iii) undo. The brushing methodology provides a medium within which a data analyst can invent data analytic methods, which are called brush techniques. This framework for the invention is similar to a Cartesian graph as the medium for inventing static displays such as normal probability plots, plots of residuals against fitted values, sharpening and many other graphical methods (Chambers et al., 1983). New bases of direct manipulation for visual data analysis were introduced e.g. linking, brushing, selection and focusing.

3.3 Visual Extension of the LSD

Iqbal and Clarke (2003b) presented a visual extension of the LSD test in which a line representing the positions of the ordered means is drawn horizontally. Another line is drawn above this line to represent the LSD (see Figure 3.1). Both the lines are drawn on the same scale. If the distance between two treatment means is greater than the LSD line’s distance then it is concluded that these two treatment means are significantly different. The idea was based on Iqbal (1999).

25

Figure.3.1 Visual LSD (Taken from Iqbal and Clarke, 2003b)

3.4 Framed Rectangles

Cleveland and McGill (1984a) introduced the concept of ‘framed rectangles (of equal length)’ in maps. They took rectangles of equal length and represented quantities with the shaded part in the rectangle and the remaining part was left blank. To compare different quantities, they used framed rectangles instead of bars of different lengths.

3.5 Origins of Pie and Doughnut chart

Playfair (1801) is the founder of the ‘part-whole’ relation. His charts remained unnoticed until Spence (2005) gave a brief account of the origins of the pie chart. In 2014, Siirtola conducted a study and evaluated the performance of the most common techniques for visualizing the data. 75% of the participants considered pie charts as the most pleasant to use, and 44% considered the pie and doughnut chart to be the fastest visualization to understand.

26

A doughnut chart is functionally and apparently alike a pie chart, but the doughnut chart has a hole in the center, because of which it resembles an edible doughnut and named a doughnut chart. These are a good way to give a birds-eye view of two or more sets of data and unlike a pie chart, it can handle multiple series. In multi-series doughnut charts, each ring represents a data series and is used to compare same components of different data sets. For detail, see Chapter 8 of Good and Hardin (2003).

Figure 3.2 Ordinary Doughnut chart Figure 3.3 Multi-Series Doughnut chart

3.6 Boxes

Hartigan (1975) introduced Boxes for representation of multivariate data with three dimensions. Width, length and height of the box are used to represent three variables. For negative value(s), a constant is added to all values to get all values positive. When variables are more than three, then a side is divided into segments to represent more than one variable (see Figure 3.2). The ordering of the variables in respect of the sides and the segments of a

27 side is important. Highly correlated variables are taken to represent in segments of a side because the human eye is more adept at identifying differences between the lengths of sides than between segments of a specific side. Grouping together highly correlated variables on one side of a box reduces the variation between segment lengths of a side for individual boxes.

Figure 3.4 Box Representation (Taken from du Toit et al. 1986, p. 60)

3.6.1 Representation of Paired Observations

Paired observations are particularly taken in medical applications. If the data may be assumed to arise from a normal distribution and there are no covariates, paired t-test is appropriate for analysis. For certain departures from normality assumptions (skewness, the presence of outliers), this test is sensitive. To accompany the analysis, an effective graphical display is needed. According to McNeil (1992), “Tukey’s sum-difference graph is popular among statisticians.” Tilted line segments plots are also used. Another method based on line segments is the “ANOVA PLOT”. A similar plot is known as “Multi-valued dot chart”. More general methods are discussed by Chambers et al. (1983) which include scatterplot matrices and, for non-negative data, star symbol plots and tree symbols. If repeated measurements are 28 the same variable, parallel coordinate plots are used as an alternative graphical display to ANOVA plots. McNeil (1992) proposed "Parallel line plot" which combines the features of ANOVA plots and Multi-valued dot charts.

3.6.2 Graphs versus Tables

Gelman et al. (2002) worked to prove that statistical papers can be benefited by changing tables into graphs. They answered the objection that “graphs require too much space to be practical” by constructing graphs of tables of JASA March 2002. These graphs are comparable in size to the original tables. Well-known principles of data display (e.g. Tufte, 1983) are followed. Tables are more effective if the goal is to read the exact values. However, the goal in statistical papers is a comparison, not the exact numbers. The idea of comparison provides a theoretical framework for statistical graphs (as is implicit in Tukey, 1972, 1977). When the article was in preparation, one of the writers (Gelman) was inspired to remake all the tables into graphs in an unrelated manuscript. The collaborators were very pleased with the new display and judged them to present the material much more clearly and in less space.

Lee (1995) has graphically demonstrated the optimality property of the median that the mean absolute deviation is a minimum when measured from the median. He gave demonstration for Continuous distribution, Discrete distribution, and mixed discrete and continuous distributions.

3.6.3 The Star Graph

Iqbal and Clarke (1999) presented a new graphical form ‘The Star Graph’ which is based on absolute residuals. It is used to check whether there is any pattern among groups of treatments or individual treatments over the whole period of the for any given response. It helps to point out any inadequacies or incompleteness in the model being used.

29 3.6.4 Mosaic Display

Mosaics are space filling designs composed of tiles like shapes. Mosaics are originated from the use of rectangles and area to show data quantities and their relations. Friendly (2002) gave the history of visual and theoretical ideas which lead to the development of the Mosaic displays.

3.6.5 Visualization in Design of Experiment

In designing large experiments particularly when an appropriate fraction is required to be selected, visualization plays an important role. Selection and then the use of such fractions (either of regular or irregular sizes) in factorial experiments have been discussed by Nawaz (2004) and Qasim (2006). In this process, they have used the concept of Visual Balance. For an example, see Table 3.1.

Table 3.1: Visually Balanced Design

1 0 0 1 1 1 1 1 2 2

2 0 1 0 0 1 2 2 1 2

3 1 0 0 2 1 0 2 2 1

Their idea and concept of visualization can be understood by means of with three factors ( 1, 2, 3) each at three levels (0, 1, 2), i.e. 33 factorial design. The design is visualized in Table 3.2 for assessing the Visual Balance.

Visual balance can be assessed along several lines of (mirror) symmetry. The cells corresponding to 100, 111 and 122 could be viewed as the line of symmetry. Here, not only the number of the shaded cells above and below the line is same but they are in mirror balance. The cells below the above-mentioned line of symmetry are 120, 212 and 221, and the cells above the line of symmetry i.e. 001, 010 and 102 show symmetry. Other lines of symmetry for the design are:

30 010, 111, 212

102, 111, 120

001, 111, 221

Table 3.2: Visually Balanced Fraction of Size 9 Mapped on 33 Factorial Experiment

X 3

X1 X 2 0 1 2

0 0 000 001 002

0 1 010 011 012

0 2 020 021 022

1 0 100 101 102

1 1 110 111 112

1 2 120 121 122

2 0 200 201 202

2 1 210 211 212

2 2 220 221 222

The fraction of this factorial design is visualized through shaded cells of the above layout.

The idea of visual balance is invariant in the sense that the impression of visual balance (and unbalance) remains unaltered even after mutual shifting of factors.

31 3.6.6 Graphs for Analysis

Cleveland and McGill (1984a) introduced the concept of ‘framed rectangles (of equal length)’ in maps. They represented quantities with the shaded part in the rectangle and the remaining part was left blank. They used framed rectangles to compare different quantities. Profile analysis is very popular in for the study of repeated measurements on the same units over a long period of time. Iqbal and Clarke (2003a) used the same for an agricultural experiment on cotton which was repeated with the same experimental treatments for 14 seasons in a row.

Few (2012) addressed the common issue of poorly designed quantitative information presentations. He gave practical and comprehensive guidance to properly create tables and graphs for effective and efficient communication. Gelman and Unwin (2013) suggested a set of goals for graphical displays mainly discussed for the Statistical point of view. They noted that within Statistics, exploratory and graphical methods represent a minor subfield. They are not well integrated with larger themes of modeling and inference. Outside of Statistics, infographics (also called information visualization or Infovis) are huge, but their purveyors and enthusiasts appear largely to be uninterested in statistical principles. They pointed out some inherent contradictions in goals between the fields of statistics and Infovis. Healy and Moody (2014) reviewed the history and current state of visualization in sociology. They encouraged practitioners and publishers to work toward a higher and more consistent standard for the graphical display of sociological insights. Cook et al. (2016) have discussed the role of data visualization in the process of analyzing big data and historical origins of statistical graphics. They have considered the examples of modern data visualizations in the process of exploring airline traffic, global standardized test scores, election monitoring, Wikipedia edits, and the mining of credit card databases.

32 3.7 Plans for Present Research Work

 In this study, new graphical presentations will be proposed. Generalized forms of some existing graphs will also be developed for the purpose of presentation and comparison of multivariate data sets. The new visualization of LSD test will also be presented which will make it objective in nature and self-explanatory as well. Proposed visualization of LSD will also be compared with that of Iqbal and Clarke (2003b) which is reviewed in section 3.3. All of this will be presented in Chapter 4.    A generalized form of Multi-series Doughnut chart (reviewed in section 3.5) will be developed for objective and easy comparison of multivariate data sets. More sophisticated way of visualization for marginal cases will also be considered. It will be done in Chapter 5.   A generalized form of Bar Charts will also be developed for the presentation and comparison of multivariate data sets at a time. The idea of Framed Bar Charts is reviewed in section 3.4. Such proposed work will be presented in Chapter 6.   The exploration of the generalized form of Boxes (reviewed in section 3.6) will be done for comparison of multivariate data sets for more than three dimensions in Chapter 7.

33

Chapter 4

Visualization of the

Least Significant Difference Test

4.1 Introduction

In the design and analysis of experiments, post hoc analysis consists of looking at the data when the experiment has concluded for patterns which were not specified as a priori. It is also called data dredging. Post hoc analyses are concerned with finding patterns and relationships between subgroups of sampled those remain undetected and undiscovered. Post hoc tests are also known as posterior tests which are applied in exploratory research. They help the researcher to formulate more efficient priori hypotheses and research designs.

34

Fisher (1935) proposed the simplest and widely used post hoc test, named the least significant difference (LSD) test. LSD is one of the post hoc tests which are applied when the hypothesis for testing equality of several means using ANOVA is rejected. It shows which means are significantly different from which. This method is based on the smallest difference among two means which is considered to be significant. All pair wise absolute differences are compared with the LSD and decision of significant pairs is made. Carmer and Swanson (1973) compared a number of multiple comparison tests on the basis of Monte Carlo simulation studies. They reported that the LSD method is an effective test for the detection of true differences in means if it is applied when F-test in the ANOVA is significant at 5% level of significance. If there are k samples, the difference between means for all [k (k-1) ⁄ 2] possible pairs is compared with the value of the LSD. This procedure becomes lengthy for large k. Therefore, to overcome this situation, visualization of the LSD is the best solution.

In this chapter, a new visualization of the LSD test is proposed which provides a quicker and clearer picture of the least significant difference test. Our proposed visualization method shows all significantly different pairs in one graph. In addition, it also shows homogeneous groups and comparison of these obvious groups. As a result, short listing of experimental treatments becomes quite easy by this visualization. It is an objective approach and provides good results when the difference between means is approximately equal to the LSD.

4.2 Visual Extension of the LSD by Iqbal and Clarke (2003b)

When the number of treatments is large then the LSD method becomes lengthy, so more time and effort is required. One solution to the problem was given by Iqbal and Clarke (2003b) by introducing Visual Least Significant Difference (VLSD). Their method proceeds as follows: A line representing positions of ordered means is drawn horizontally. Another horizontal line is drawn above this line to represent the LSD. Both the lines are drawn on the same scale. A visual comparison between the difference in means and length of the LSD is

35 made. If the distance between two treatment means is greater than the distance of LSD line then it is concluded that these two treatment means are significantly different. The idea was based on Iqbal (1999).

The following graph (Figure 4.1) of a data set for cotton crop with 10 treatments taken from an experiment is used as an example in Iqbal and Clarke (2003b). The experiment was repeated for 14 consecutive seasons in a row from 1982 to 1995 on the Randomized Complete Block Design with three replications. In the example, VLSD method is applied on a response Seed Cotton Yield for last 4 years i.e. for the years 1992, 1993, 1994 and 1995. Here it is concluded that in the case of year the 1992, treatments 1 and 2 are not significantly different from each other but significantly different from treatments 3, 4, 5, 6, 7, 8, 9 and 10. Treatments 4 and 10 are not significantly different from each other but significantly different from treatments 1, 2, 3, 5, 6, 7, 8 and 9. Also, treatments 3, 5, 6, 7, 8, and 9 are not significantly different from each other.

Figure 4.1 Visual LSD by Iqbal and Clarke (2003b)

36 4.3 A New Visualization Method for the LSD Test

In this section, a new visualization method for the LSD test is proposed which gives a clearer and quick picture of the LSD test. Our proposed visualization method displays all significant pairs in one sight. It also provides a comparison by groups of means. Homogeneous groups are also easily identified. Our proposed visualization of the LSD is an objective. The outlines of the procedure are as under:

i. All means (arranged in ascending order) are plotted at equal distances using thin lines.

ii. A thick line representing the LSD is augmented at the top of each thin line of means. Both the thin lines of means and the thick line of the LSD are drawn on the same scale. The value of the LSD is calculated in the usual manner.

iii. A horizontal dashed line is drawn to the right at the top of each of the augmented lines (mean + LSD).

iv. A mean is significantly different from all those means if the horizontal dashed line of mean cuts the thin line of any other mean.

The above procedure is explained with the help of following examples.

Example 4.3.1: (Visual LSD Test for Five Means)

Following data is taken from Chaudhry and Kamal (1996, p. 446). Five means are:

A = 6.84, B = 6.46, C = 13.12, D = 7.96, E = 4.92. α = 0.05 and LSD = 2.09.

To make the decision of significant pairs, using traditional LSD test, differences of all possible 10 pairs have to be compared with the value of the LSD. But our proposed new graph shows all significant pairs at once.

37

Figure 4.2 Visual LSD by the Writer

It is clear from the Figure 4.2 that significant pairs of means are:

A & C

B & C

C & D

C & E

D & E

It is also clear from Figure 4.2 that A, B, and E form a group which is homogeneous. Also, A, B, and D form a homogeneous group. C is significantly different from all others i.e. A, B, D, and E.

38 Example 4.3.2: (Visual LSD Test for Five Means)

Data is taken from Abdi and Williams (2010). Means are M1 = 30, M2 = 35, M3 = 38, M4 =

41 and M5 = 46. α = 0.05 and LSD = 8.08.

Figure 4.3 Visual LSD for Five Means

Figure 4.3 shows all significant pairs of means which are: 1 & 4 1 & 5 2 & 5

Pairs M3 & M5, and M1 & M3 are although not significantly different from each other but they are at the edge to become significantly different from each other. It is obvious from the Figure 4.3 that M1 and M2 form a group which is homogeneous, whereas M4 and M5 form another group.

39 Example 4.3.3: (Visual LSD Test for Five Means)

Data is taken from Montgomery (1996, p. 102).

Value of means is ̅1 = 9.8, ̅2 = 15.4, ̅3 = 16.6, ̅4 = 21.6, ̅5 = 10.8 = 0.05, = 3.75

Here 5 means are taken. If we compare the difference of all possible pairs then 10 pairs have to be compared with the value of the LSD and then a decision of significant pairs is made for each pair. Our presented new graph clearly shows all significant pairs at once. Homogeneous groups are also differentiable at the same time.

Figure 4.4 Visual LSD for Five-Means-Another Case

40 From Figure 4.4, it is clear that significant pairs of means are: 1̅ & 2̅ ̅1 & ̅3 ̅1 & ̅4 ̅2 & ̅4 ̅2 & ̅5 ̅3 & ̅4 ̅3 & ̅5 ̅4 & ̅5

It is also clear from Figure 4.4 that 1̅ and 5̅ form a group which is homogeneous, whereas ̅2 and 3̅ form another group, whereas 4̅ is significantly different from all others.

Example 4.3.4. (Visual LSD Test for Six Means)

Data is taken from Palaniswamy and Palaniswamy (2006). 0 = 15.87, 1 = 19.29, 2 = 15.73, 3 = 18.79, 4 = 19.19, 5 = 19.48, = 0.05, = 1.87

Here 6 means are taken. If we compare the difference of all possible pairs then 15 pairs have to be compared with the value of the LSD and then a decision of significant pairs is made for each pair. Our presented new graph gives a quick and clear picture of all significant pairs and obvious groups at once.

41

Figure 4.5 Visual LSD for Six-Means

It is obvious from Figure 4.5 that significant pairs of means are: 0 & 1 0 & 3 0 & 4 0 & 5 2 & 1 2 & 3 2 & 4 2 & 5

42

It is also clear from the Figure 4.5 that there are two obvious groups which are significantly different from each other. One group comprises of M0 and M2, while other of M1, M3, M4, and M5.

Example 4.3.5: (Visual LSD Test for Six Means)

Data is taken from Chaudhry and Kamal (1996, p. 325). Values of means are:

X1 = 1.75, X2 = 4.00, X3 = 4.75, X4 = 5.75, X5 = 3.50, X6 = 1.75

α = 0.05, LSD = 1.89

In this example, 6 means are taken. If we compare the difference of all possible pairs then 15 pairs have to be compared with the value of the LSD and then a decision of significant pairs is made for each pair. In this situation, our presented new graph shows all significant pairs at a glance. Homogeneous groups are also clearly visible from the Figure 4.6

.

Figure 4.6 Visual LSD for Six-Means- Another Case 43 From the Figure 4.6, it can be easily noted that significant pairs of means are:

X1 & X2 X1 & X3

X1 & X4 X6 & X2

X6 & X3 X6 & X4

X4 & X5

Example 4.3.6: (Visual LSD Test for Ten Means)

Data is taken from Curran-Everett (2000).

ӯ1 = 474, ӯ 2 = 291, ӯ3 = 487, ӯ4 = 404, ӯ5 = 632, ӯ6 = 503,

ӯ7 = 373, ӯ8 = 370, ӯ9 = 770, ӯ10 = 612, α = 0.05, LSD = 74

Here 10 means are taken. If we compare differences of all possible pairs then 45 pairs have to be compared with the value of the LSD and then a decision of significant pairs is made for each pair. This lengthy procedure takes ample time. Our proposed new graph gives a quick picture of all significant pairs in a .

It is clear from the Figure 4.7 that significant pairs of means are

ӯ2 & ӯ8 ӯ8 & ӯ6 ӯ4 & ӯ6 ӯ6 & ӯ5

ӯ2 & ӯ7 ӯ8 & ӯ10 ӯ4 & ӯ10 ӯ6 & ӯ9

ӯ2 & ӯ4 ӯ8 & ӯ5 ӯ4 & ӯ 5 ӯ10 & ӯ9

ӯ2 & ӯ1 ӯ8 & ӯ9 ӯ4 & ӯ9 ӯ5 & ӯ9

ӯ2 & ӯ3 ӯ7 & ӯ1 ӯ1 & ӯ10

ӯ2 & ӯ6 ӯ7 & ӯ3 ӯ1 & ӯ5

ӯ2 & ӯ10 ӯ7 & ӯ6 ӯ1 & ӯ9

ӯ2 & ӯ5 ӯ7 & ӯ10 ӯ3 & ӯ10

ӯ2 & ӯ9 ӯ7 & ӯ5 ӯ3 & ӯ5

ӯ8 & ӯ1 ӯ7 & ӯ 9 ӯ3 & ӯ 9

ӯ8 & ӯ3 ӯ4 & ӯ3 ӯ6 & ӯ10

44

Figure 4.7 Visual LSD for Ten Means

It is also visible from the Figure 4.7 that ӯ2 and ӯ9 are significantly different from all means and homogeneous groups of means are

ӯ4, ӯ7 & ӯ8

ӯ1, ӯ3 & ӯ6

ӯ5 & ӯ10 4.4 Summary

In this chapter, new proposed visualization method of Least Significant Difference Test (LSD Test) have been presented. LSD test is widely used when testing of hypothesis regarding equality of several means, using ANOVA is rejected and we want to identify mean is different from which. Pair wise comparison becomes quite lengthy when the number of means is increasing. Therefore, to overcome this situation, visualization of the LSD is the best solution. Our proposed visualization method is a single picture which displays all significant pairs in one sight and it is an objective method. It provides a comparison by paired means as well as by groups of means. Homogeneous groups are also identified easily by our graphical display which shows the importance of the common saying “One picture is worth ten thousand words”.

Our new proposed graphical display is also compared with the visual LSD proposed by Iqbal and Clarke (2003) which is subjective in nature. Our proposed graphical display is far clearer and objective than that f Iqbal and Clarke (2003). Our proposed method particularly gives better results in marginal cases. It also carries an aesthetic element.

46

Chapter 5

Framed Multi-

Series Doughnut Charts and Arc- Pyramid Graphs

5.1 Pie Chart and Doughnut Chart

A pie chart is used to compare the component parts to its total (see Figure 5.1). Its main application is in business and journalism. A doughnut chart is functionally and apparently like a pie chart but the doughnut chart has a hole in the center. It resembles a doughnut and therefore, named as a doughnut chart (see Figure 5.2). The most basic pie chart is generally attributed to William Playfair's Statistical Breviary of 1801 (Playfair, 1801). He gave two such graphs. This graph was not commonly used in the beginning. Spence (2005) gave a brief account of the origins of the pie chart and also of Playfair.

47

Figure 5.1 Pie Chart

Figure 5.2 Doughnut Chart

5.2 Multi-Series Pie and Doughnut Chart

A multi-series pie chart and multi-series doughnut chart are used to compare the same components of different data sets (see Figure 5.3). In multi-series pie chart and multi- series doughnut chart, each ring represents a data set.

48

Figure 5.3 Multi-Series Doughnut Chart

Comparison of components is easy when the number of components is two or three. Comparison becomes difficult and subjective when the number of components is more than three. Especially, when any of the same components of two or more data sets are nearly equal then comparison becomes more difficult. Reason is that when a component ends then the next component starts, so the starting line of each component for different data sets is different. Only the first and the last components of each data set are compared easily because their one end line is same. But all other components between first and last are not easily compared. For approximately equal values of same components of different data sets, therefore, this comparison becomes difficult and subjective (to some extent).

5.3 New Visualization Method

In this section, a new graphical methods “Framed Multi-series Doughnut Chart or Framed Doughnut Chart” is presented. It will make a comparison of each component in a multi- series doughnut chart (or multi-series pie chart). It is the generalized form of multi-series doughnut chart (or multi-series pie chart). It makes the comparison objective and easy.

Cleveland and McGill (1984a) introduced the concept of ‘framed rectangles (of equal length)’ in maps. They took rectangles of equal length and represented quantities with the shaded part in the rectangle and left the remaining part blank. They used framed rectangles instead of the bars of different lengths to compare different quantities. This idea of framing

49 is used here to solve this problem. Each component in multi-series doughnut chart is converted into a percentage. Every component is represented in a separate arc-section which is taken equal to 100 %. In the arc-sections, every component is represented by the colored part (aligned to the left side) and the remaining part is left blank. After the arc- section of a component, the next arc-section of the next component starts and so on. Every component starts form the same line for every data set. It means each component starts from the same base line which makes the comparison of same components of different data sets very easy. It is formed in the following manner.

Angle of each arc-section = (3600) ÷ (n) where n = number of components

Angle of component within each arc-section = (component ÷ total) × (3600 ÷ n)

In this chapter, all the data are transformed to make maximum value equal to 99% for the special purpose of study: the marginal cases. That’s why all data sets are unit free i.e. dimensionless.

5.4 Framed Doughnut Charts

In this section, Framed Doughnut Chart is explained with the help of several data.

5.4.1 Comparison of Ten Data Sets, each with Two Components

Here, Framed Doughnut Chart is presented for ten data sets, each with two components. Table 5.1 shows Imports and Exports (two components) of Pakistan for consecutive ten years (10 data sets). Framed Doughnut Chart of this data is shown in Figure 5.4.

50 Table 5.1 : Imports and Exports in Pakistan (2000- 2010)

YEAR IMPORTS EXPORTS

2000-2001 23 27

2001-2002 23 26

2002-2003 28 31

2003-2004 31 39

2004-2005 36 52

2005-2006 41 72

2006-2007 42 76

2007-2008 48 99

2008-2009 44 87

2009-2010 48 87

Figure 5.4 Framed Doughnut Chart for Imports and Exports in Pakistan (Mid 2000-Mid 2010)

It is obvious from Framed Doughnut Chart(Figure 5.4) that comparison of Imports and Exports can be easily made through this graph. Also, it is clear that Exports are increasing at a higher rate than Imports.

51

5.4.2 Comparison of Four Data Sets, each with Three Components

Here, Framed Doughnut Chart is presented for four data sets, each with three components.Table 5.2 contains data of Agricultural Machinery in Pakistan for four different years covering a span of 30 years. Framed Doughnut Chart of this data is shown in Figure 5.5.

Table 5.2: Agricultural Machinery in Pakistan (For Years 1975, 1984, 1994 and 2004)

Machinery 1975 1984 1994 2004 Tractors 4 17 27 43 Implements 6 29 52 83 Tubewell &lift pumps 17 26 49 99

Figure 5.5 Framed Doughnut Chart for Agricultural Machinery in Pakistan (For Years 1975, 1984, 1994 and 2004)

Above Framed Doughnut Chart (Figure 5.5) shows the gradual increase in Agricultural Machinery in Pakistan over a period of 30 years (1975-2004). This graph also shows that Agricultural Machinery has significantly increased with the passage of time.

52

5.4.3 Comparison of Five Data Sets, each with Six Components

Here, Framed Doughnut Chart is drawn for five data sets, each with six components. Table 5.3 contains data of Imports in Pakistan (2005- 2010). Framed Doughnut Chart is shown in Figure 5.5.

Table 5.3: Imports in Pakistan (2005- 2010)

Machinery Food & Minerals Animal or Manufactured Year &Transport Live Chemicals &fuel vegetable goods equipment animals lubricants oils &fats

2005-06 56 23 12 28 47 6 2006-07 62 23 9 30 53 7 2007-08 68 27 14 41 88 13 2008-09 71 31 21 46 90 14 2009-10 70 33 16 56 99 14

Figure 5.6 Framed Doughnut Chart for Imports in Pakistan (Mid2005-Mid2010)

Figure 5.6 shows Imports in Pakistan (2005- 2010). It is obvious from Figure 5.6 that:

 All imports are increasing in the mentioned period except Food & Live Animals, which show fluctuations.

53

 Machinery & Transport equipment, and Minerals & fuel lubricants, are the major parts of imports.   Animal, vegetable oils & fats are the minor part.   Minerals & fuel lubricants have the maximum increase.

5.4.4 Comparison of Six Data Sets, each with Six Components

Here, Framed Doughnut Chart is presented for six data sets, each with six components. Imports for the Year 2010 (January-June) are given in Table 5.4. Framed Doughnut Chart for this table is shown in Figure 5.7.

Table 5.4: Imports for Year 2010(January -June)

Machinery Food & Minerals Animal or & Manufactured Month Live Chemicals and fuel vegetable Transport goods animals lubricants oils &fats equipment Jan 65 25 9 35 80 8 Feb 45 21 8 30 55 9 Mar 53 22 10 37 82 12 Apr 52 27 15 38 62 10 May 44 25 13 39 96 11 Jun 50 30 16 48 62 13

Figure 5.7 Framed Doughnut Chart for Imports for Year 2010(January-June)

54

Figure 5.7 shows Imports in Pakistan for Year 2010 (January-June). The graph shows that all the Imports have fluctuations. It may be due to the fact that the given period is small to show a general trend of imported goods.

5.4.5 Comparison of Six Data Sets, each with Six Components: Another Case

Here, Framed Doughnut Chart is presented again for six data sets, each with six components. Imports for the Year 2010 (July-December) are given in Table 5.5. Framed Doughnut Chart for this table is shown in Figure 5.8.

Table 5.5: Imports for Year 2010(July-December)

Machinery Food & Minerals Animal or Manufactured Month &Transport Live Chemicals and fuel vegetable goods equipment animals lubricants oils &fats July 47 22 15 44 82 11 Aug 46 24 14 40 70 14 Sep 51 27 20 34 44 14 Oct 52 27 24 35 75 12 Nov 42 26 25 34 80 14 Dec 52 31 21 39 99 16

Figure 5.8 shows Framed Doughnut Chart for Imports in Pakistan for the Year 2010 (July -December). The graph shows that Machinery & Transport equipment, and Minerals & fuel lubricants are the major parts of imports.

55

Figure 5.8 Framed Doughnut Chart for Imports for Year 2010(July -December)

5.4.6 Comparison of Ten Data Sets, each with Seven Components

Here, Framed Doughnut Chart is presented for ten data sets, each with seven components. Table 5.6 shows Educational Level of Provinces of Pakistan. Framed Doughnut Chart of this data is shown in Figure 5.9.

Table 5.6: Educational Level of Provinces of Pakistan

Province Below Primary Middle Matric Inter B.A/ Others Primary B.Sc. N.W.F.P 56 84 56 53 17 10 7 FATA 61 99 63 38 11 5 6 Punjab 54 90 62 47 16 9 5 Sindh 44 77 54 50 25 21 11 Baluchistan 54 73 57 53 18 13 15 Islamabad 40 64 53 51 28 29 18

56

Figure 5.9 Framed Doughnut Chart for Educational Level of Provinces of Pakistan

Figure 5.9 shows Framed Doughnut Chart for Educational Level of Provinces of Pakistan. It is obvious from the Figure 5.9 that Educational Level is the highest at primary education. The maximum value is for primary level of Fata. The graph also shows that both pre-primary and middle levels have almost the same level.

5.4.7 Comparison of Four Data Sets, each with Nine Components

Here, Framed Doughnut Chart is presented for four data sets, each with nine components.

Table 5.7 shows Area under Important Crops in Pakistan for four different censuses.

Framed Doughnut Chart of this data is shown in Figure 5.10.

57

Table 5.7: Area under Important Crops in Pakistan (For Years 1972, 1980, 1990 and 2000) CROPS Year 1972 Year1980 Year1990 Year 2000

Wheat 68 77 86 99

Rice 19 24 26 31

Cotton 25 24 28 34

Sugarcane 5 7 8 9

Maize 7 6 9 9

Oil seed 6 5 5 5

Pulses 17 15 11 13

Fooders 29 29 29 26

Others 5 6 11 10

Figure 5.10 Framed Doughnut Chart for Area under Important Crops in Pakistan (For Years 1972, 1980, 1990 and 2000)

It is obvious from Figure 5.10 that the major crop is wheat which occupies the maximum cultivated area and is increasing with time. The next main crops are rice and cotton, whose areas have also increased. Fodders have also a significant part in the Figure 5.10.

58

5.4.8 Comparison of Ten Data Sets, each with Two Components

Here, we have taken ten data sets each with two components. Table 5.8 shows Imports and Exports for 10 consecutive years. Imports are compared with Exports for each year. Framed Doughnut Chart for this data is shown in Figure 5.11.

Table 5.8: Imports versus Exports in Pakistan (1990-2000)

YEAR IMPORTS EXPORTS

1990-1991 15 19

1991-1992 17 23

1992-1993 17 25

1993-1994 17 21

1994-1995 20 26

1995-1996 22 30

1996-1997 21 30

1997-1998 22 25

1998-1999 19 24

1999-2000 21 26

Figure 5.11 Framed Doughnut Chart for Imports versus Exports in Pakistan (Mid 1990- Mid 2000)

It obvious from the Figure 5.11 that volume of Imports and Exports is increasing with the passage of time but the rate of increase is not high. It is also obvious from the Figure 5.11 that Exports are more than Imports throughout the decade.

59 5.5 Arc- Pyramid Graphs

In the Framed Doughnut charts, there is one inconvenience that when the maximum value which is taken as (or transformed to) 99% which is represented by the colored portion in the arc-section. Since each arc-section is taken equal to 100%, so the remaining blank part in the arc-section remains very small. That’s why the end of the arc-section seems to coincide with the colored portion of the next arc-section and the starting line of the next arc-section seems to merge with this arc-section.

Our proposed Arc-Pyramid Graphs are presented here which are a solution of this problem. In these graphs, all component values are aligned to the center of the arc-section so that blank parts of two arc-sections are combined to make a clear distinction between the arc-sections. Graphs of this new type are presented with the data sets of the previous sections.

5.5.1 Arc- Pyramid Graphs For Two Data Sets, Each with Ten Components

Table 5.9 shows Imports and Exports for 10 consecutive years. Imports are compared for 10 years. Year wise Exports are also compared for the same period. Arc-Pyramid Graph for this data is shown in Figure 5.12.

Table 5.9: Imports and Exports in Pakistan (1990- 2000)

YEAR IMPORTS EXPORTS

1990-1991 15 19

1991-1992 17 23

1992-1993 17 25

1993-1994 17 21

1994-1995 20 26

1995-1996 22 30

1996-1997 21 30

1997-1998 22 25

1998-1999 19 24

1999-2000 21 26

60

Figure 5.12 Arc-Pyramid Graph for Imports and Exports in Pakistan (Mid 1990-Mid 2000)

It is obvious from the Figure 5.12 that Imports for 10 years are compared. Also year wise Exports are compared independently. Both Imports and Exports are increasing with the passage of time but the rate of increase is slow.

5.5.2 Arc- Pyramid Graphs For Two Data Sets, Each with Ten Components: Another Case

Here, Arc- Pyramid Graph is presented for Table 5.1 which shows Imports and Exports (two components) of Pakistan for ten consecutive years (10 data sets). Arc-Pyramid Graph of this data is shown in Figure 5.13.

61

Figure 5.13 Arc-Pyramid Graph for Imports and Exports in Pakistan (Mid 2000-Mid 2010)

Figure 5.13 shows Arc-Pyramid Graph comparing Imports as well as Exports for a period of 10 continuous years. It is visible from the Figure 5.13 that Exports are increasing at a higher rate in the given period of a decade. Imports are slowly increasing with time. We can also compare Figure 5.4 with the Figure 5.13 that marginal case of Exports for the year 2007-08 is easily distinguishable in Arc-Pyramid Graph.

5.5.3 Arc- Pyramid Graphs For Four Data Sets, Each with Three Components

Here, Arc-Pyramid Graph is presented for four data sets, each with three components. Data of Table 5.2 is used here which contains data of Agricultural Machinery in Pakistan for four different years covering a span of 30 years. Arc-Pyramid Graph of this data is shown in Figure 5.14.

62

Figure 5.14 Arc-Pyramid Graph for Agricultural Machinery in Pakistan (For Years 1975, 1984, 1994 and 2004)

Figure 5.14 shows the Arc-Pyramid Graph for Agricultural Machinery in Pakistan. This graph shows that Agricultural Machinery has increased significantly over the given period of 30 years (1975-2004). Comparison of Framed Doughnut Chart (Figure5.5) and Arc-Pyramid Graph (Figure 5.13) for this data clearly shows the difference for marginal case (value 99) of Tube well and lift pumps for the year 2004. Arc-Pyramid Graph (Figure 5.13) gives better result in this case.

5.5.4 Arc- Pyramid Graphs For Five Data Sets, Each with Six Components

Here, Arc-Pyramid Graph is drawn for five data sets each having six components. Data of Table 5.3 is being used here which contains Imports in Pakistan (2005- 2010). Arc- Pyramid Graph is shown in Figure 5.15.

63

Figure 5.15 Arc-Pyramid Graph for Imports in Pakistan (Mid 2005- Mid 2010)

Figure 5.15 shows Arc-Pyramid Graph for Imports in Pakistan (2005- 2010). Figure 5.15 shows that all Imports are increasing but Food & Live animals show fluctuations. Figure 5.15 also shows that major parts of Imports are Machinery &Transport equipment, and Minerals & fuel lubricants while Animal or vegetable oils & fats are the minor part. Figure 5.15 show that Minerals & fuel lubricants have the maximum increase.

5.5.5 Arc- Pyramid Graphs For Six Data Sets, Each with Six Components

Here, Arc-Pyramid Graph is presented for six data sets each with six components. Data of Table 5.4 is being used which shows Imports for Year 2010 (January -June). Arc-Pyramid Graph is shown in Figure 5.16.

64

Figure 5.16 Arc-Pyramid Graph for Imports for Year 2010(January -June)

Figure 5.16 shows Arc-Pyramid Graph for Imports in Pakistan for Year 2010 (January - June). The graph shows that all the Imports have fluctuations which may be due to the short period data.

5.5.6 Arc- Pyramid Graphs For Six Data Sets, Each with Six Components: Another Case

Arc-Pyramid Graph is presented for six data sets each having six components. Data of Table 5.5 is being used which shows Imports for Year 2010 (July -December). Arc- Pyramid Graph is shown in Figure 5.17.

65

Figure 5.17 Arc-Pyramid Graph for Imports for Year 2010(July-December)

Figure 5.17 shows Arc-Pyramid Graph for Imports in Pakistan for the Year 2010 (July - December).The graph shows that Machinery & Transport equipment and Minerals & Fuel lubricants are the major parts of Imports.

5.5.7 Arc- Pyramid Graphs For Six Data Sets, Each with Seven Components

Here, Arc-Pyramid Graph is presented for Table 5.6 which shows data of Educational Level of Provinces of Pakistan. Arc-Pyramid Graph for this data is shown in Figure 5.18.

66

Figure 5.18 Arc-Pyramid Graph for Educational Level of Provinces of Pakistan

Figure 5.18 shows Arc-Pyramid Graph for Educational Level of Provinces of Pakistan. From Figure 5.18, it is clear that the highest educational level is of primary education. The maximum value is for primary level of Fata. It is also noted that both the pre-primary and middle levels show almost the same level.

5.5.8 Arc- Pyramid Graphs For Four Data Sets, Each with Nine Components

Here, Arc-Pyramid Graph is presented for Table 5.7 which shows area under Important Crops in Pakistan for four different censuses. Arc-Pyramid Graph for this data is shown in Figure 5.19.

67

Figure 5.19 Arc-Pyramid Graph for Area under Important Crops in Pakistan (For Years 1972, 1980, 1990 and 2000)

From Figure 5.19, it is evident that the wheat occupies the maximum cultivated area which is increasing with time. The next main crops are rice, cotton, and fodder.

68 5.6 Summary

In this chapter, two new innovative graphical methods Framed Multi-series Doughnut Charts and Arc-Pyramid Graphs are proposed. These graphical forms are used for the comparison of multivariate data sets. These are also used for the comparison of different components of different data sets in multi-series doughnut charts. This comparison was quite difficult and subjective when the number of components was three or more. Our proposed method Framed Multi-series Doughnut Charts has made this comparison easy and objective. These graphs show the relationship of parts to the whole. Different data sets may be compared easily. These graphs also provide better results for borderline cases.

Our proposed Arc- Pyramid Graphs are the new graphical version of framed doughnut charts. In the Framed Doughnut Charts, when any of the component value is 99% or more, then this component is represented by the colored portion in the arc-section which is taken as 100%. In this case, the blank portion of 1% or less in the arc-section remains very small which seems to get merged with the colored portion of the next arc- section. This is an extremely marginal case. Arc-Pyramid Graphs are the solution to the difficult cases. In these graphs, we have made alignment of the component values to the center of the arc-sections so that the blank parts of two arc-sections are combined and make a clearer distinction between them. This makes the graph easier for the comparison of extremely large values.

69

Chapter 6

Framed Component Bar Chart

6.1 Simple Bar Chart

A simple bar chart is a one-dimensional representation in which horizontal or vertical bars with equal width but lengths proportional to the values are used.

6.2 Component Bar Chart

In the component bar chart, each bar is divided into two or more sections, in size proportionate to the component parts of a total being displayed by the bar.

70 6.3 Percentage Component Bar Chart

If each component in a component bar chart is expressed as a percentage of the respective total then resulting chart is known as Percentage Component Bar Chart. In this chart, bars of length equal to 100 are drawn which are then subdivided into the proportion of the percentages of their components. If there are two components and same components of different bars are to be compared, then this comparison is easy.

But comparison becomes difficult and subjective when the number of components is more than two. If any of the same components of two or more data sets have nearly equal values, then comparison becomes difficult. Reason is that when the segment of a component ends then the segment of next component starts, so the starting line of a segment of each component for different data sets is different. Only the segments of the first and the last components of each data set can be compared easily because their one end line is same. All other components between the first and the last cannot be easily compared. So this comparison becomes difficult and subjective (to some extent) for approximately equal values of same components of different data sets.

6.4 Framed Component Bar Chart

In this section, a new proposed graphical method “Framed Component Bar Chart” is presented to make the comparison objective and easy. It is the generalized form of percentage component bar chart. It compares each component in percentage component bar charts of all data sets. Cleveland and McGill (1984a) introduced the concept of Framed Rectangles (of equal length) in maps. They took rectangles of equal length, represented quantities with the shaded part in the rectangle and left the remaining part blank (see Figure 6.1). They used framed rectangles instead of bars of different lengths to compare different quantities. This idea of framing is adopted in proposed method. In this method, every component is represented by a colored part and remaining part is left blank. After the section of a component, the next section of the next component starts and so on. For every

71 data set, each component starts from the same baseline which makes the comparison of same components of different data sets very easy.

Figure 6.1 Framed Rectangles Proposed By Cleveland and McGill (1984a)

6.5 Framed Component Bar Chart for Two Data Sets Each with Two Components

In this section, Framed Component Bar Charts for two data sets each with two components is presented. It is shown in Figure 6.2. This new graphical form makes it easier to compare each component of both data sets.

72

Figure 6.2 Framed Component Bar Charts for Two Data Sets and Two Components

6.6 Framed Component Bar Chart for Two Data Sets Each with Four Components

In this section, Framed Component Bar Charts for two data sets each with four components is presented. Each and every component of both data sets is compared easily and independently. This comparison is objective in nature.

Figure 6.3 shows Framed Component Bar Charts for two data sets each with four components. This visualization method easily compares each component of both data sets.

73

Figure 6.3 Framed Component Bar Charts for Two Data Sets and Four Components

6.7 Framed Component Bar Chart for Four Data Sets Each with Seven Components

In this section, we are presenting Framed Component Bar Charts for four data sets each having seven components. Framed Component Bar Charts is drawn in the Figure 6.4. Comparison of same components of all data sets is very easy through this new graphical form.

74

Figure 6.4 Framed Component Bar Charts for Four Data Sets and Seven Components

6.8 Framed Component Bar Chart for Six Data Sets Each with Nine Components

In this section, Component Bar Charts for six data sets each with nine components is presented. It is shown in Figure 6.5. Each chart has nine components. This graphical form makes it possible to compare same components of six data sets at a time. Comparison in the case of the close value of components is also clear.

75

Figure 6.5 Framed Component Bar Charts for Six Data Sets and Nine Components

6.9 Framed Component Bar Chart for Six Data Sets Each with Ten Components

This section contains Framed Component Bar Charts for six data sets when each data set contains ten components. It is shown in Figure 6.6. Components of data sets are compared easily.

76

Figure 6.6 Framed Component Bar Charts for Six Data Sets and Ten Components

77 6.10 Summary

In this chapter, a new proposed graphical method “Framed Component Bar Charts” is introduced. Framed component bar charts are designed to compare multivariate data sets. These graphs are used to compare different components (variables) in percentage component bar charts when the number of components is three or more. In percentage component bar charts for more than two components, the graphical comparison was difficult and subjective. Our proposed visualization method has made this graphical comparison objective and easy for more than two components. Cleveland and McGill (1984 a) introduced the concept of “framed rectangles” in maps. By the use of this framing technique in our proposed graphical form, many data sets with many components can be easily compared. So our proposed visualization form, has generalized the comparison of many components of percentage component bar charts for many data sets.

78

Chapter 7 Framed Boxes

7.1 Boxes

Hartigan (1975) introduced Boxes (volume chart) for the representation of multivariate data with three dimensions. Width, length, and height of the box are used to represent three variables (see Figure 7.1). In the case of negative value(s), a constant is added to all values to get all values positive. If variables are more than three, then a side of the box (height) is divided into segments to represent more than one variable (see Figure 7.2). The ordering of the variables is important when segments are taken along a side. Highly correlated variables are taken to represent in segments of a side.

Figure 7.1 Box for One Data Set

79

Figure7.2 Box Representation Taken from du Toit et al. (1986, p. 60)

Figure7.3 Boxes for Three Data Sets

When data sets are more than one, each with three variables then comparison among these data sets is easy because one variable is taken along the width, one is taken along the length and one is taken along the height (see Figure 7.3). When data sets are more than one, each with four variables then comparison among these data sets is also easy because one variable is taken along the width, one is taken along the length and two variables are taken along

80 the height which is divided into two segments. But comparison becomes difficult and subjective when the number of variables to be represented in segments (along the height) is more than two. Especially, when any of the same variables of two or more data sets have nearly equal values, then comparison becomes more difficult. Reason is that when the segment of a variable ends then the segment of the next variable starts, so the starting line of the segment of each variable for different data sets is different. Only the segments of the first and the last variables of each data set are compared easily because their one end line is same. But all other variables between the first and the last segments are not easily compared. So this comparison becomes difficult and subjective (to some extent) for approximately equal values of the same variables of different data sets.

7.2 Framed Boxes

In order to make the comparison objective and easy, a new graphical method, Framed Boxes is proposed. It is the generalized form of boxes and will make a comparison of the segments of each variable for all data sets. Cleveland and McGill (1984a) introduced the concept of ‘framed rectangles (of equal length)’ in maps. They took rectangles of equal length and represented quantities with the shaded part in the rectangle and left the remaining part blank. They used framed rectangles instead of bars of different lengths to compare different quantities. This idea of framing is used to solve this problem. Every variable is converted into a percentage. Every variable is represented in a separate box section which is taken equal to 100 in length, width, and height. In the box sections, every variable is represented by a colored part and the remaining part is left blank. After the box section of a variable, the next box section of the next variable starts and so on. Every variable starts from the same line for every data set. So each variable starts from the same base line which makes the comparison of the same variables of different data sets very easy.

81 Table 7.1 Marks Data Subject Student 1 Student 2 Student 3 Student 4 Student 5 Student 6 1 76 84 84 72 80 84 2 84 80 60 96 88 72 3 72 76 64 72 72 92 4 72 92 40 72 64 64 5 96 96 76 80 92 96 6 76 76 92 84 92 92 7 84 80 76 84 84 92 8 84 80 84 80 64 88 9 76 80 76 88 72 84 10 76 92 88 88 64 96

Data in the Table 7.1 is a subset taken from du Toit et al (1986, p. 6). It is multivariate data. This data (Table 7.1) shows the percentage marks of 6 students in 10 different subjects. The marks of a student in 10 subjects make one data set. The marks of 6 students in these 10 subjects show 6 data sets. Framed Boxes for a different number of students with a different number of subjects is drawn. The performance of a student in different subjects can be inspected, as well as different subjects can also be compared at the same time.

7.2.1 Framed Boxes for the Marks of Four Students in Seven Subjects

In this section, Framed Boxes are presented for the marks of the first four students in the first seven subjects from Table 7.1.

82

Figure 7.4 Framed Boxes for the Marks of Four Students in Seven Subjects

Framed Boxes presented in Figure 7.4 shows the marks of the four students in seven subjects. It is obvious from the graph that marks of all the students in the subject 1 which are taken along the breadth (X-axis) can be compared easily. The marks in the subject 7 which are taken along the length (Y-axis) are also easily comparable. Comparison of the marks of subject 2, 3, 4, 5 and 6, which are taken as subsections along the length (Z-axis), is also straightforward. The marks of all the four students are comparable without any difficulty in this graph. The performance of the students as well as the subjects can be easily compared through this generalized visualization method. This graphical comparison gives objective results.

7.2.2 Framed Boxes for the Marks of Two Students in Six Subjects

Framed Boxes for the marks of the first two students in the first six subjects from Table 7.1 are presented in Figure 7.5.

83

Figure7.5 Framed Boxes for the Marks of the Two Students in Six Subjects

Framed Boxes presented in Figure 7.5, compares the marks of two students in six subjects. The marks of the two students in all the six subjects are easily comparable in this graph e.g. in the first subject student 2 has more marks than student 1. Individual marks of a student can also be analyzed through this graphical form.

7.2.3 Framed Boxes for the Marks of Six Students in Eight Subjects

Framed Boxes for the marks of the first six students in the first eight subjects from Table 7.1 are presented in Figure 7.6.

84

Figure7.6 Framed Boxes for the Marks of Six Students in Eight Subjects

In Framed Boxes of Figure 7.6, the marks of the six students in eight subjects are being compared. The marks of the six students in all the eight subjects are easily comparable in this graph. it is obvious from the graph that the lowest marks are in subject 4 of student 3.

7.2.4 Framed Boxes for the Marks of Two Students in Seven Subjects

Framed Boxes for the marks of the first two students in the first seven subjects from Table 7.1 are presented in Figure 7.7.

85

Figure 7.7 Framed Boxes for the Marks of Two Students in Seven Subjects

Framed Boxes presented in Figure 7.7, compares the marks of the two students in seven subjects. Comparison of the marks is easy through this graph.

7.2.5 Framed Boxes for the Marks of Six Students in Six Subjects

In this section, Framed Boxes are presented for the marks of the first six students in the first six subjects from Table 7.1.

86

Figure7.8 Framed Boxes for the Marks of Six Students in Six Subjects

In Framed Boxes presented in Figure 7.8, the marks of the six students in six subjects are taken. The marks of the given subjects are being compared effortlessly through this graph. This comparison gives objective results.

7.2.6 Framed Boxes for the Marks of Six Students in Five Subjects

In this section, Framed Boxes are presented for the marks of the first six students in the first five subjects from Table 7.1.

87

Figure 7.9 Framed Boxes for the Marks of Six Students in Five Subjects

In Framed Boxes presented in Figure 7.9, the marks of six students in five subjects are taken. The marks of all the students in these different subjects are being compared in this graphical form. The marks of a student in different subjects are also being compared in this graphical form.

7.2.7 Framed Boxes for the Marks of Six Students in Four Subjects

This section contains Framed Boxes for the marks of the first six students in the first four subjects from Table 7.1.

Figure7.10 Framed Boxes for the Marks of Six Students in Four Subjects

88

In Framed Boxes presented in Figure 7.10, the marks of six students in four subjects are shown. The marks of all the students in all four subjects are being compared in this graph. Individual marks of a student can also be analyzed through this graphical form.

7.2.8 Framed Boxes for the Marks of Five Students in Eight Subjects

In this section, we are presenting Framed Boxes for the marks of the first five students in the first eight subjects. Data is taken from Table 7.1.

Figure7.11 Framed Boxes for the Marks of Five Students in Eight Subjects

In Framed Boxes presented in Figure 7.11, the marks of the five students in eight subjects are displayed. Graphical comparison of the marks of all the students is quite simple through these Framed Boxes.

89

7.2.9 Framed Boxes for the Marks of Five Students in Seven Subjects

In this section, Framed Boxes are presented for the marks of the first five students in the first seven subjects from Table 7.1.

Figure7.12 Framed Boxes for the Marks of Five Students in Seven Subjects

In Framed Boxes presented in Figure 7.12, the marks of the five students in seven subjects are taken. Through this generalized form, student’s performance can be compared to a subject as well as in a number of subjects. Also, an overall result of a subject can be inspected as well as result of subjects can also be compared.

7.2.10 Framed Boxes for the Marks of Five Students in Six Subjects

Framed Boxes for the marks of first five students in first six subjects from Table 7.1 are presented in Figure 7.13.

90

Figure7.13 Framed Boxes for the Marks of Five Students in Six Subjects

In Framed Boxes presented in Figure 7.13, the performance of five students is compared with respect to six subjects.

7.2.11 Framed Boxes for the Marks of Five Students in Five Subjects

In this section, Framed Boxes are presented for the marks of the first five students in the first five subjects from Table 7.1.

91

Figure7.14 Framed Boxes for the Marks of Five Students in Five Subjects

In Framed Boxes presented in Figure 7.14, the marks of five students in five subjects are taken. The marks are being compared in this graph. Students can be compared with respect to any of the given subjects.

7.2.12 Framed Boxes for the Marks of Five Students in Four Subjects

In this section, Framed Boxes are presented for the marks of first five students in first four subjects from Table 7.1.

Figure7.15 Framed Boxes for the Marks of Five Students in Four Subjects

92

In Framed Boxes presented in Figure 7.15, the marks of five students in four subjects are taken. Individual marks of any student can be analyzed through this graphical form.

7.2.13 Framed Boxes for the Marks of Four Students in Eight Subjects

In this section, Framed Boxes are displayed for the marks of the first four students in the first eight subjects. Subset data is taken from Table 7.1.

Figure7.16 Framed Boxes for the Marks of Four Students in Eight Subjects

In Framed Boxes presented in Figure 7.16, the marks of four students in eight subjects are being compared. This generalized graphical form gives objective results of the comparison.

93

7.2.14 Framed Boxes for the Marks of Four Students in Six Subjects

In this section, Framed Boxes are presented for the marks of the first four students in six subjects from Table 7.1.

Figure7.17 Framed Boxes for the Marks of Four Students in Six Subjects

In Framed Boxes presented in Figure 7.17, the marks of the four students in six subjects are taken. Individual marks of a student are comparable through this graphical form. The marks of all the students in all six subjects are being compared easily.

94

7.2.15 Framed Boxes for the Marks of Four Students in Five Subjects

In this section, Framed Boxes are presented for the marks of the first four students in the first five subjects from Table 7.1.

Figure7.18 Framed Boxes for the Marks of Four Students in Five Subjects

In Framed Boxes presented in Figure 7.18, the marks of the four students in five subjects are taken. Through this generalized form, the overall result of a subject can be inspected as well as result of all the subjects can also be compared.

7.2.16 Framed Boxes for the Marks of Four Students in Four Subjects

This section contains Framed Boxes for the marks of the first four students in the first four subjects using Table 7.1.

95

Figure7.19 Framed Boxes for the Marks of Four Students in Four Subjects

In Framed Boxes presented in Figure 7.19, the marks of the four students in four subjects are taken. Students’ performance is compared to a subject as well as in a number of subjects. Also, an overall result of a subject can also be analyzed through this graphical form.

7.2.17 Framed Boxes for the Marks of Three Students in Eight Subjects

In this section, Framed Boxes for the marks of the first three students in the first eight subjects are presented from Table 7.1.

96

Figure7.20 Framed Boxes for the Marks of Three Students in Eight Subjects

In Framed Boxes presented in Figure 7.20, the marks of three students in eight subjects are taken. Students’ marks can be compared in a subject as well as in a number of subjects.

97

7.2.18 Framed Boxes for the Marks of Three Students in Seven Subjects

In this section, Framed Boxes for the marks of the first three students in the first seven subjects from Table 7.1.

Figure7.21 Framed Boxes for the Marks of Three Students in Seven Subjects In Framed Boxes presented in Figure 7.21, comparison of the marks of three students in seven subjects is made. This generalized form compares result in a subject as well as result of all the subjects without any difficulty.

98

7.2.19 Framed Boxes for the Marks of Three Students in Six Subjects

This section contains Framed Boxes showing the marks of the first three students in the first six subjects from Table 7.1.

Figure7.22 Framed Boxes for the Marks of Three Students in Six Subjects

Framed Boxes presented in Figure 7.22 show the marks of three students in six subjects.

This generalized form shows the result of all the students in the given subjects.

99

7.2.20 Framed Boxes for the Marks of Three Students in Five Subjects

In this section, Framed Boxes are presented for the marks of the first three students in the first five subjects from Table 7.1.

Figure7.23 Framed Boxes for the Marks of Three Students in Five Subjects

In Framed Boxes presented in Figure 7.23, the marks of the three students in five subjects are compared. Through this generalized form, the overall result of a subject can be inspected as well as result of all the subjects can also be compared.

100

7.2.21 Framed Boxes for the Marks of Three Students in Four Subjects

In this section, Framed Boxes are presented for the marks of the first three students in the first four subjects from Table 7.1.

Figure7.24 Framed Boxes for the Marks of Three Students in Four Subjects

In Framed Boxes presented in Figure 7.24, the marks of students, as well as subjects, are compared. This generalized form compares the overall result of a subject as well as result of all the subjects.

101 7.3 Summary

Framed Boxes, a new graphical method is proposed here. The foundation of this graphical form has been laid for the first time and no one has done it before. Now-a-days, most of the data sets to be analyzed and compared are multivariate in nature. Framed boxes are used to compare multivariate data in a quite easy and objective way. Boxes are used to represent three-dimensional data. One variable is taken as width, one as the length and one as the height of the box. In the case of more than three variables, the height of the box is divided into different segments to represent more than one variable along the height. When the data set consists of four variables, the height is divided into two segments only. Comparison of such data sets is easily possible. But if the data sets consist of five or more variables and the height is divided into three or more segments, then a comparison of variables along the subdivided height is not easy and becomes subjective in nature. In this complicated situation, a new visualization method “Framed Boxes” have been proposed to make a comparison of such multivariate data sets objective and easy. It has been done by the use of framing introduced by Cleveland and McGill (1984 a) in maps. In our proposed method, every variable is represented along the height in a separate box section which is taken as 100% along the length, width and height. Every variable has been converted into a percentage. Correlated variables are taken along the height which is subdivided into sections of boxes, each of 100%. Each box has the same starting base lines along the length and width which have made the comparison of multivariate data sets possible in boxes. This is an easy method and gives objective results. In marginal cases, it provides best results. It is the generalized form of subdivided boxes. Generalization has made this visualization method more valuable and useful.

102

Chapter 8

Summary and Future Research

8.1 Summary

In this study, new graphical forms are introduced. These graphical forms are very useful for the statisticians as well as for the data analysts. A major goal of the study is the generalization of some graphical forms. This generalization increases the scope of the graph because generalized forms of the graphs are more useful. These graphs are presented in different colors which will attract the viewers.

 A visualization of Least Significant Difference (LSD) Test is presented which is an objective approach. This graph shows clearly and easily the significant pairs due to which the hypothesis of the equality of the several means is rejected in ANOVA. The objective sense of visualization of this graphical form increases its importance. Its simplicity is an additional quality, due to which anyone can use it and can draw its conclusions.

103

 A new graphical form “Framed Doughnut Charts” is presented which is the generalization of Multi-series Doughnut Charts.    A new generalized form of Multi-series Doughnut Charts “Arc-Pyramid Graphs” is proposed which has an aesthetic sense.    The traditional Component Bar Chart is also modified in Framed Component Bar Chart to enjoy the generalization. This proposed generalization is an objective method of visualization and is used for the comparison of multivariate data sets.   Boxes are multidimensional representation. Framed Boxes, the generalization of Boxes is also proposed which are used for the comparison of multivariate data. It is an easy and objective method of visualization.   Program for Visual LSD in Java is presented as Appendix A.    Program for Framed Doughnut Charts in Visual C++ is presented as Appendix B.    Program for Arc- pyramid Graphs in Visual C++ is presented as Appendix C.    Program for Framed Component Bar Chart coded in Java is presented as Appendix D.   Program for Framed Boxes coded in Visual C++ is presented as Appendix E.

Hence concluded that the proposed new graphs present multivariate data sets successfully and compare them easily. These graphs are in generalized form and objective in nature.

8.2 Implication of the Study

The present study has various implications and it will unfold the understanding of the complex data and the relationship among different variables.. The visualization of big data will become easy which is fruitful for decision making. The new technique of visualization

104

will be beneficial for (i) managerial decision making for their market research and (ii) the organizations to visualize large data basis.

8.3 Future Research

Visualization has a broad scope and can be extended too many other cases to:

 attempt effective visualization techniques for understanding of data relationships within large, complex databases where each database contains thousands of records with numerous variables per record.   stress the need for visualization by applying it to a large array of application areas.   represent visually the different methods, procedures, and tests of statistics.   argue and gauge the impact and efficacy of visualization on understanding the results and drawing conclusions.   assess the acceptability of visualization by the users of statistics from different areas of its application.   check the availability and level of user-friendliness of computer routines for the purpose.

105

LIST OF COMPUTER PROGRAMS

1- Visual LSD

2- Framed Doughnut Charts

3- Arc-Pyramid Graphs

4- Framed Component Bar Chart

5- Framed Boxes

106 Appendix - A

Computer Program for Visual LSD

This class takes the value for LSD from user

/* project : LSD graph

* Input : NULL

* output : get input from user & write in file

* Class : LSDdraw

* Date : 16-feb-2011

*/ import javax.swing.*; import java.awt.*; import java.awt.List.*; import java.io.*; import java.awt.event.*;

public class LSDdraw extends JFrame{ final int MAX_VALUE = 20; // this is the max value for LSD

public Double opr1,opr2,ans; // public variables declare of type Double

public boolean turn=false; // initialize public variable turn with false.

public String opt; // variable declare of type String

public char fn=','; // initialize character variable fn with ‘,’

// declare Arrays to input Names and Values of length 20. Container con;

public String inputNamesArray[] = new String[20]; public String inputValuesArray[] = new String[20];

//////////////////////////////////////////////// make labels and buttons for input fields

JLabel Input = new JLabel("INPUTS FILEDS"); // Label to input fields.

107 JTextField txt=new JTextField(6); // Text field to input data.

JButton bt=new JButton("Make Fields"); // button to make fields

// labels for Names and Values.

JLabel NAME = new JLabel("NAMES");

JLabel VALUES = new JLabel("VALUES");

// Display label to input value of LSD in text field JLabel LabelOfLSD = new JLabel("Value Of LSD"); JTextField valueOfLSD=new JTextField(6);

JButton GraphBt=new JButton("Make Graph"); // Display a button to make Graph.

JTextField [] txt2 = new JTextField[40]; // Declare a new array of length 40.

/////////////////////////////////////////////////

public LSDdraw(){ // draw LSD container

con=getContentPane(); //function call con.setLayout(null); // function call to set layout. opt=""; con.add(Input); // function call to add input values con.add(txt); // function call to add text.

con.add(bt); // function call to add button

Insets insets = con.getInsets(); // function call

Dimension size = Input.getPreferredSize(); // function call to set size of Values field

Input.setBounds(10 + insets.left, 10 + insets.top,size.width, size.height);

size = txt.getPreferredSize(); // function call to set size of textbox txt.setBounds(50 + insets.left, 25 + insets.top,size.width, size.height);

size =bt.getPreferredSize(); // function call to set size of button

108 bt.setBounds(50 + insets.left, 50 + insets.top,size.width, size.height);

////////////////////////////////////////////////

this.setBounds(300,100,500,500); //function call by values to set components

// setting values this.setResizable(false); // output screen can’t be resized

this.setVisible(true); // Display output screen

this.setTitle("LSD::Value"); // set title of output screen. this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // set option to close output screen

/**************Add Listener to Buttons**************/

ButtonHandler handler=new ButtonHandler(); // Make new array to handle button. bt.addActionListener(handler);

GetValueHandler ValueHandler=new GetValueHandler(); // Make new array to handle values.

GraphBt.addActionListener(ValueHandler);

}

/*********setting action of Buttons***********/ public class ButtonHandler implements ActionListener // Button handler class

{

//function definition to perform action when button is clicked public void actionPerformed(ActionEvent event){

// check condition if button is pressed then call function to input text. if(event.getSource()==bt){ opt = txt.getText();

}

109 opr1= Double.parseDouble(opt);

System.out.print(opr1); // print entered text.

Addfileds(); // function call to add new fields.

}

};

/**************Method For Operations on Operands**************/ public void Addfileds() // Function definition to add new fields

{

// check condition if entered text length is greater than 20 then do nothing and return to calling function if(opr1>20)

{ return;

} con.removeAll(); //call function to remove all values setVisible(false); // set Display screen to invisible.

//------AD NEW PAGE------// con.add(NAME); // function call to add Names Insets insets = con.getInsets();

// Set text length of field Name

Dimension size = NAME.getPreferredSize();

NAME.setBounds(50 + insets.left,50 + insets.top,size.width, size.height);

con.add(valueOfLSD); // function call to add value of LSD

// Set number of digits to be entered in field valueof LSD size = valueOfLSD.getPreferredSize(); valueOfLSD.setBounds(150 + insets.left,15 + insets.top,size.width, size.height);

// function call to add values con.add(VALUES);

110

// Set number of digits to be entered in field Values size = VALUES.getPreferredSize();

VALUES.setBounds(140 + insets.left, 50 + insets.top,size.width, size.height);

// function call to add Label of LSD con.add(LabelOfLSD);

// set size of field LabelofLSD size = LabelOfLSD.getPreferredSize();

LabelOfLSD.setBounds(50 + insets.left,15 + insets.top,size.width, size.height);

int i=0; for(i=0 ;i

{ txt2[i]=new JTextField(4); // make a new array for text field of length 4

con.add(txt2[i]); size = txt2[i].getPreferredSize();

// Setting components of graph after checking condition if(i<20) // if vale of loop variable (i) is less than 20 and i is even then set bounds according to below line. if(i%2== 0) txt2[i].setBounds(50 + insets.left, 80+(i*15) + insets.top,size.width, size.height); else // otherwise set bounds as given below line. txt2[i].setBounds(140 + insets.left, 80+((i-1)*15) + insets.top,size.width, size.height); else // if vale of loop variable (i) is greater than 20 and i is even then set bounds according to below line. if(i%2== 0) txt2[i].setBounds(250 + insets.left, 80+((i-20)*15) + insets.top,size.width, size.height); else // otherwise set bounds as given below line. txt2[i].setBounds(340 + insets.left, 80+((i-21)*15) + insets.top,size.width, size.height);

}

111 con.add(GraphBt); // function to Add graph button size = GraphBt.getPreferredSize();

// if loop variable (i) is less than or equal to 20 then set bound as below line. if(i <= 20)

GraphBt.setBounds(100 + insets.left, 80+(i*15)+ insets.top,size.width, size.height); else // otherwise set bound according to below line.

{

GraphBt.setBounds(300 + insets.left, 80+((i-20)*15)+ insets.top,size.width, size.height);

} setVisible(true); // Set display screen to be visible.

}

/*********************** GetValueHandler *******************************/

public class GetValueHandler implements ActionListener{

public void actionPerformed(ActionEvent event){

if(event.getSource() == GraphBt) // check whether Graph button is pressed or not.

{// if yes try{ // Display output

FileWriter output=new FileWriter("output.DAT"); // Make output file as “output.DAT”

BufferedWriter out = new BufferedWriter(output); // Make out file as “output”

// Arrays.sort(inputNamesArray,0,4); out.write(valueOfLSD.getText().toString()+"\n"); // write data to file out.write(""+Math.round(opr1)+"\n"); for(int i=0;i

{ if(i%2==0) // Check if i is even

112 { inputNamesArray[i/2] = txt2[i+1].getText(); // then store value of textbox to new array. System.out.println(inputNamesArray[i/2]); // print names from array. if(inputNamesArray[i/2].length() == 1) // if name is of length 1 then set position. inputNamesArray[i/2] = "00"+inputNamesArray[i/2]; else if(inputNamesArray[i/2].length() == 2) // if name is of length 2 then set position. inputNamesArray[i/2] = "0"+inputNamesArray[i/2]; out.write(inputNamesArray[i/2].toString()+"_"); // print names with a bar on name } else // if i is odd { inputValuesArray[i/2] = txt2[i-1].getText(); // then store value of textbox to new array. System.out.println(inputValuesArray[i/2]); // print values from array. out.write(inputValuesArray[i/2].toString()+"\n"); } } out.close(); // close out file output.close(); // close output file JFrame ff = new JFrame(); ff.setTitle("Table LSD TEST"); // set title of output screen ff.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // set close option

// set graph components ff.add(new tableLSD()); ff.setSize(600,600); ff.setLocation(300,300); ff.setResizable(false); ff.setVisible(true);

113

JFrame f = new JFrame(); f.setTitle("VISUAL LSD TEST"); f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); f.add(new graphLSD()); f.setSize(600,600); f.setLocation(10,10); f.setResizable(false); f.setVisible(true);

for(int i=0;i<2*2;i++)

{

System.out.println(inputNamesArray[i]); // print names using array

}

} catch(IOException e) // Input/output exception handler.

{

System.out.println("Unable to create: "+e.getMessage()); // print message on wrong input

}

}

}

}; //GetValueHandler

};

This class Display the Graph According to the User value OF LSD

/* project : LSD graph

* Input : input file

114 * output : genrate LSD graph

* Class : graphLSD

* Date : 16-feb-2011

*/ import java.awt.*; import java.awt.font.*; import java.awt.geom.*; import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import javax.swing.*; import java.util.Arrays;

public class graphLSD extends JPanel { int MaxLine; // declare an integer type variable public String data_str []= new String[20]; // create a new array of length 20 public String data_string [][]= new String[20][2]; // create new 2 dimensional array of 20 rows and 2 columns final int PAD = 80; // here PADing double MEAN = 6.5; //Mean value // Draw graph

protected void paintComponent(Graphics g) { try{ super.paintComponent(g);

Graphics2D g2 = (Graphics2D)g;

g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); int w = getWidth(); //get the total width of the penal int h = getHeight(); //get the total height of the penal

115

///------File--Reading------// create new files to read data

FileReader output=new FileReader("output.DAT");

BufferedReader out = new BufferedReader(output);

//Arrays.sort(inputNamesArray,0,4)

MEAN = Integer.parseInt(out.readLine()); // read a line and set value of Mean MaxLine = Integer.parseInt(out.readLine()); // read a line and set value of MaxLine for(int i=0;i

}

// close files out.close(); output.close();

//------end--of—File Reading------

// Set scale of graph double xInc = (double)(w - 2*PAD)/(MaxLine); double scale = (double)(h-(MEAN*(h-2*PAD)/getMax())-2*PAD)/getMax(); MEAN *= scale;

g2.draw(new Line2D.Double(PAD/2, PAD, PAD/2, h-PAD)); // Draw abcissa. // horizantal line

116 g2.draw(new Line2D.Double(PAD/2, h-PAD, w-PAD, h- PAD)); // Draw labels.

Font font = g2.getFont();

FontRenderContext frc = g2.getFontRenderContext();

LineMetrics lm = font.getLineMetrics("0", frc); float sh

= lm.getAscent() + lm.getDescent();

// Abcissa label.

String s = "MEANS"; // initialize string variable s with “MEANS”

// set values and draw them float sy = h - PAD + (PAD - sh)/2 + lm.getAscent(); float sw = (float)font.getStringBounds(s, frc).getWidth(); float sx = (w - sw)/2-PAD/2; g2.drawString(s, sx, sy);

// set y-axis int height_of_y_axis = h-(2*PAD); int YaxisPoint = (int)Math.round((height_of_y_axis/10)/scale); g2.setPaint(Color.red); // set paint color for(int i=10 ; i>=0;i--) g2.drawString(""+i*YaxisPoint, PAD/2-20,h-PAD-(int)(i*height_of_y_axis/10)); // Draw lines. for(int i = 0; i

double x2 = PAD/2 + (i+1)*xInc; double y2 = h - PAD - scale*Integer.parseInt(data_string[i][0])- MEAN; g2.draw(new Line2D.Double(x2, h-PAD, x2, y2));

117 double gap = (PAD/2+xInc*(MaxLine)-x2); for(int k = 0; k < gap ; k+= 7) g2.draw(new Line2D.Double(x2+k, y2, x2+k+3, y2));

for(int j = i; j < MaxLine; j++)

{ g2.setPaint(Color.red); double x1 = PAD/2 + j*xInc+xInc; double y1 = h - PAD - scale*Integer.parseInt(data_string[j][0]);//-MEAN*4;

// if value of y1 is less than value of y2 then draw a cross if(y1

DrawCross(g2,x1,y2,6);

}

g2.drawString(data_string[i][1], (float)x2-5,h-PAD+20); g2.draw(new Line2D.Double(x2-5, h-PAD+6, x2+8, h-PAD+6));

}

// set color to red and display “VISUAL LSD TEST” g2.setPaint(Color.RED); g2.drawString("VISUAL LSD TEST",sx, 20);

// set color to blue and display data g2.setPaint(Color.blue);

g2.drawString("KEY:",w-60, 2*PAD); g2.drawString("Means:",w-80, 2*PAD+30); g2.drawString("LSD :",w-70, 2*PAD+60);

// draw line of color dark blue. g2.setPaint(Color.blue.darker()); g2.draw(new Line2D.Double(w-30, 2*PAD+27, w-5, 2*PAD+27));

118

// draw a small rectangle of color Black g2.setPaint(Color.BLACK); g2.fill(new Rectangle2D.Double(w-30, 2*PAD+57,25,4));

// Mark data points. for(int i = 0; i < MaxLine; i++) { double x = PAD/2 + (i+1)*xInc; double y = h - PAD - scale*Integer.parseInt(data_string[i][0]);

g2.fill(new Rectangle2D.Double(x-2, y-MEAN, 4, MEAN)); }

} catch(IOException e) // Input/output exception handler.

{

System.out.println("Unable to create: "+e.getMessage()); // print message on wrong input

}

}

private int getMax() // private function to get maximum value.

{ int max = -Integer.MAX_VALUE; // initialize max variable with maximum value for(int i = 0; i < MaxLine; i++) {

// check if data value is greater than max value if(Integer.parseInt(data_string[i][0]) > max) max = Integer.parseInt(data_string[i][0]); // then put data value in max variable.

} return max; // return value of max

119 }

// private function to draw cross private void DrawCross(Graphics2D g2,double x, double y,int width) { g2.draw(new Line2D.Double(x-width/2, y-width/2, x+width/2, y+width/2)); g2.draw(new Line2D.Double(x-width/2, y+width/2, x+width/2, y-width/2));

}

}

This class Display the Table According to the User value OF LSD

/* project : LSD graph

* Input : input file

* output : genrate table and significat pairs

* Class : tableLSD

* Date : 16-feb-2011

*/ import java.awt.*; import java.awt.font.*; import javax.swing.*; import java.io.*;

public class tableLSD extends JPanel {

// to read data from file declare new array of String type. public String data_str []= new String[20];

// to manage the data according to variable & values declare new two dimensional array public String data_string [][]= new String[20][2]; final int PAD = 40;// there is margin form the boundary int TABLE_WIDTH =25; // per cell width = TABLE_WIDTH*2 and hieght = TABLE_WIDTH double MEAN = 6.5; // Set value of Mean.

120

// Protected function definition to draw components protected void paintComponent(Graphics g) { try{ super.paintComponent(g);

Graphics2D g2 = (Graphics2D)g; g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

int w = getWidth(); int h = getHeight();

Font font = g2.getFont();

FontRenderContext frc = g2.getFontRenderContext();

//------

FileReader output=new FileReader("output.DAT");

BufferedReader out = new BufferedReader(output);

//Arrays.sort(inputNamesArray,0,4) MEAN =

Integer.parseInt(out.readLine()); int MaxLine = Integer.parseInt(out.readLine()); for(int i=0;i

{ data_str[i] = out.readLine(); // read string from file

}

//Arrays.sort(data_str,0,MaxLine);

for(int i=0;i

{

121 System.out.println(data_str[i]); // Print string data_string[i] = data_str[i].split("_");

}

// close files out.close(); output.close();

//------DISPLAY--TABLE------

// Display string of Red color. g2.setPaint(Color.red); g2.drawString("Table LSD TEST", w/2-40, 20);

// Display graph of Blue color according to condition. g2.setPaint(Color.blue);

for(int i=0;i

{ if(i<10)

{ g2.drawRect(i*2*TABLE_WIDTH+PAD, PAD+TABLE_WIDTH, 2*TABLE_WIDTH, TABLE_WIDTH); g2.drawString(data_string[i][1], i*2*TABLE_WIDTH+PAD+10, TABLE_WIDTH+PAD+15); g2.drawRect(i*2*TABLE_WIDTH+PAD, PAD+TABLE_WIDTH+TABLE_WIDTH, 2*TABLE_WIDTH, TABLE_WIDTH); g2.drawString(""+Integer.parseInt(data_string[i][0]), i*2*TABLE_WIDTH+PAD+10, 2*TABLE_WIDTH+PAD+15);

} else

{

122 g2.drawRect((i%10)*2*TABLE_WIDTH+PAD, 60+PAD+TABLE_WIDTH,2*TABLE_WIDTH, TABLE_WIDTH); g2.drawString(data_string[i][1], (i%10)*2*TABLE_WIDTH+PAD+10, 60+TABLE_WIDTH+PAD+15); g2.drawRect((i%10)*2*TABLE_WIDTH+PAD, 60+PAD+TABLE_WIDTH+TABLE_WIDTH,2*TABLE_WIDTH, TABLE_WIDTH); g2.drawString(""+Integer.parseInt(data_string[i][0]), (i%10)*2*TABLE_WIDTH+PAD+10,60+2*TABLE_WIDTH+PAD+15);

}

} g2.setPaint(Color.red); g2.drawString("Value Of LSD : "+MEAN,2*TABLE_WIDTH+PAD, 6*TABLE_WIDTH+PAD+15);

g2.drawString("Significant pairs:",2*TABLE_WIDTH+PAD, 7*TABLE_WIDTH+PAD+15);

// Display LSD line of black color according to condition g2.setPaint(Color.black); int lineNo = 1;

for(int i=0;i

{ if( Integer.parseInt(data_string[i][0])+MEAN < Integer.parseInt(data_string[k][0]))

{ if(lineNo <= 20) g2.drawString("( "+data_string[i][1]+" And "+data_string[k][1]+" )",2*TABLE_WIDTH+PAD+10, 8*TABLE_WIDTH+PAD+15*lineNo);

else if(lineNo <= 40)

123 g2.drawString("( "+data_string[i][1]+" And "+data_string[k][1]+" )",8*TABLE_WIDTH+PAD+10, 8*TABLE_WIDTH+PAD+15*(lineNo%20));

else g2.drawString("( "+data_string[i][1]+" And "+data_string[k][1]+" )",14*TABLE_WIDTH+PAD+10, 8*TABLE_WIDTH+PAD+15*(lineNo%20)); lineNo++;

}

}

} catch(IOException e) // Input/ Output exception handler

{

System.out.println("Unable to create: "+e.getMessage()); // print message on wrong input

}

}

}

///////////////////////////////////////////////////////THEEND//////////////////////////////////////////////////////////// //

124 Appendix - B

Computer Program for Framed Doughnut Charts

This is used to draw the Circles and the slices according the input data. // Function Define as drawPie of class CAssignmentView voidCAssignmentView::drawPie(CDC *pDC) {

CPen pen; // Variable declaration

pen.CreatePen(PS_SOLID, 0, RGB(0,0,0)); // Function call

pDC->SelectObject(&pen); // Function Call using pointer

double rad=radius; // Initialize value of rad variable of type double with the value of radius double diff=rad/(noofst+1); // Declare and initialize variable diff with an expression.

// For loop to define components of chart using subject name. for(inti=0;i

{

int y1,y2,y3,y4; // Variables declaration

// calculate value of y1, y2, y3 and y4.

y1=(rad*cos(180.0*22.0/7.0/180.0))*1.001;

y2=(rad*sin(90.0*22.0/7.0/180.0))*0.99;

y3=(rad*cos(0.0*22.0/7.0/180.0))*1.001;

y4=(rad*sin(270.0*22.0/7.0/180.0))*0.99;

y1=cenx+y1;

y2=ceny-y2;

y3=cenx+y3;

y4=ceny-y4;

pDC->Ellipse(y1,y2,y3,y4); //Call function Ellipse using pointer

125 rad-=diff; // subtract values of rad and diff and assign to rad

//Assign values of y1, y2, y3 and y4 to student’s data.

stData[i].x1=y1;

stData[i].x2=y2;

stData[i].x3=y3;

stData[i].x4=y4;

}

//Assign new values rad=radius; diff = rad/(noofst+1); double theta,tdiff=360.0/noofsb; // Declare variables theta and initialize variable tdiff theta=tdiff; //Assign value of tdiff to theta

// For loop to define components of chart using subject marks. for(i=0;i

{

int y1,y2,y3,y4;

y1=rad*cos(theta*22.0/7.0/180.0);

y2=rad*sin(theta*22.0/7.0/180.0);

// Check condition if value of y1 is greater than 0 then increment 2 in the value of y1 otherwise decrement 2 from the value of y1.

if(y1>0)

y1+2;

else

y1-=2;

// Check condition if value of y2 is greater than 0 then increment 2 in the value of y2 otherwise decrement 2 from the value of y2.

if(y2>0)

126 y2+2;

else

y2-=2;

y1=cenx+y1;

y2=ceny-y2;

y3=diff*cos(theta*22.0/7.0/180.0);

y4=diff*sin(theta*22.0/7.0/180.0);

// Check condition if value of y3 is greater than 0 then decrement 2 from the value of y3 otherwise increment 2 to the value of y3.

if(y3>0)

y3-=2;

else

y3+=2;

// Check condition if value of y4 is greater than 0 then decrement 2 from the value of y4 otherwise increment 2 to the value of y4.

if(y4>0)

y4-=2;

else

y4+=2;

y3=cenx+y3;

y4=ceny-y4;

// functions call by Value using

pointer pDC->MoveTo(y3,y4);

pDC->LineTo(y1,y2);

127

theta+=tdiff; //Add values of theta and tdiff to theta.

}

//Assign new values

rad=radius;

tdiff=360.0/noofsb;

theta=tdiff;

// nested For loop to draw chart and fill colors

for(i=0;i

{

for(int j=0;j

{

doubleperce= (double)stData[i].cob.snumber[j]/(double)stData[i].cob.tsnumber[j];

doublereper=tdiff*perce;

reper=(theta-tdiff+reper);

int ptcr1,ptcr2,ptcr3,ptcr4;

ptcr1=rad*cos(reper*22.0/7.0/180.0)*1.005;

ptcr2=rad*sin(reper*22.0/7.0/180.0)*1.005;

ptcr3=(rad-diff)*cos(reper*22.0/7.0/180.0)*0.985;

ptcr4=(rad-diff)*sin(reper*22.0/7.0/180.0)*0.985;

ptcr1=cenx+ptcr1;

ptcr2=ceny-ptcr2;

ptcr3=cenx+ptcr3;

ptcr4=ceny-ptcr4;

128

pDC->MoveTo(ptcr3,ptcr4);

pDC->LineTo(ptcr1,ptcr2);

intx,y;

x=(rad-10)*cos(((theta-tdiff)+reper)/2.0*22.0/7.0/180.0);

y=(rad-10)*sin(((theta-tdiff)+reper)/2.0*22.0/7.0/180.0);

x=cenx+x;

y=ceny-y;

if(perce*tdiff>2){

if(!samecol){

CBrushcbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->FloodFill(x,y,RGB(0,0,0));

}

else{

CBrushcbr(fcol[j]);

pDC->SelectObject(&cbr);

pDC->FloodFill(x,y,RGB(0,0,0));

}

}

theta+=tdiff; // add values of theta and tdiff

} rad-=diff; //subtract value of rad and diff

129 } colorconf(pDC); //Function prototype for color reference.

}

//This function is used for color reference.

Void CAssignmentView::colorconf(CDC *pDC)

{

CRectcr;

GetClientRect(&cr);

CPen pen; inttop,right,left,bottom; left=cr.right-30; top=cr.top+60; right=cr.right-10; bottom=cr.top+80; if(!samecol){

for(inti=0;i

{

CBrushcbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,stName[i]);

top+=30;

bottom+=30;

}

}

130 else

{

for(inti=0;i

{

CBrushcbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,sbName[i]);

top+=30;

bottom+=30;

}

}

}

// Subject Class, its variable and methods

Class CSubject

{ public:

CString sname[10]; // Variable declare for Subject Name int snumber[10]; //Variable declare for Subject Numbers int tsnumber[10]; //Variable declare for Total Numbers

CSubject(); // Declare constructor

virtual ~CSubject(); //Declare a virtual Destructor.

};

// Student Class, its variables and methods Class CStudent

{

131 public:

CSubject cob; // variable declare of type CSubject

int x1,x2,x3,x4;

CStudent();

virtual ~CStudent();

};

// Student data input class with public inheritance. classCTreeDlg : public CDialog

{

// Construction public:

CTreeDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data

//{{AFX_DATA(CTreeDlg)

enum { IDD = IDD_DIALOG2 }; //enum creates new data type IDD.

CString m_name1;

CString m_name10;

CString m_name2;

CString m_name3;

CString m_name4;

CString m_name5;

CString m_name6;

CString m_name7;

CString m_name8;

CString m_name9;

//}}AFX_DATA

132 // Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CTreeDlg)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

// Generated message map functions

//{{AFX_MSG(CTreeDlg) virtual

BOOL OnInitDialog(); virtual void

OnOK(); //}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

CTreeDlg::CTreeDlg(CWnd* pParent /*=NULL*/)

: CDialog(CTreeDlg::IDD, pParent)

{

//{{AFX_DATA_INIT(CTreeDlg)

m_name1 = stName[0];

m_name10 = stName[9];

m_name2 = stName[1];

m_name3 = stName[2];

m_name4 = stName[3];

m_name5 = stName[4];

m_name6 = stName[5];

133 m_name7 = stName[6];

m_name8 = stName[7];

m_name9 = stName[8];

//}}AFX_DATA_INIT

}

voidCTreeDlg::DoDataExchange(CDataExchange* pDX)

{

CDialog::DoDataExchange(pDX);

//{{AFX_DATA_MAP(CTreeDlg)

DDX_Text(pDX, IDC_EDIT1, m_name1);

DDX_Text(pDX, IDC_EDIT10, m_name10);

DDX_Text(pDX, IDC_EDIT2, m_name2);

DDX_Text(pDX, IDC_EDIT3, m_name3);

DDX_Text(pDX, IDC_EDIT4, m_name4);

DDX_Text(pDX, IDC_EDIT5, m_name5);

DDX_Text(pDX, IDC_EDIT6, m_name6);

DDX_Text(pDX, IDC_EDIT7, m_name7);

DDX_Text(pDX, IDC_EDIT8, m_name8);

DDX_Text(pDX, IDC_EDIT9, m_name9);

//}}AFX_DATA_MAP

}

BEGIN_MESSAGE_MAP(CTreeDlg, CDialog)

//{{AFX_MSG_MAP(CTreeDlg)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

134

/////////////////////////////////////////////////////////////////////////////

// CTreeDlg message handlers

BOOL CTreeDlg::OnInitDialog()

{

CDialog::OnInitDialog();

int R_NO=1027;

// TODO: Add extra initialization

here for(inti=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

R_NO=1017;

// TODO: Add extra initialization

here for(i=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

return TRUE; // return TRUE unless you set the focus to a control

// EXCEPTION: OCX Property Pages should return FALSE

}

135 voidCTreeDlg::OnOK()

{

// TODO: Add extra validation here

UpdateData(TRUE);

stName[0]=m_name1;

stName[1]=m_name2;

stName[2]=m_name3;

stName[3]=m_name4;

stName[4]=m_name5;

stName[5]=m_name6;

stName[6]=m_name7;

stName[7]=m_name8;

stName[8]=m_name9;

stName[9]=m_name10;

CDialog::OnOK();

}

// Subject data input classwith public inheritance. Class CSubName: public CDialog

{

// Construction public:

CSubName(CWnd* pParent = NULL); // standard constructor

// Dialog Data

//{{AFX_DATA(CSubName)

enum { IDD = IDD_DIALOG4 };

136 CString m_sub1;

CString m_sub10;

CString m_sub2;

CString m_sub3;

CString m_sub4;

CString m_sub5;

CString m_sub6;

CString m_sub7;

CString m_sub8;

CString m_sub9;

//}}AFX_DATA

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CSubName)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

// Generated message map functions

//{{AFX_MSG(CSubName) virtual

BOOL OnInitDialog(); virtual void

OnOK();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

137 Appendix - C

Computer Program for Arc-Pyramid Graphs

This is used to draw the Circles and the slices according the input data.

// Function Define as drawPie of class CAssignmentView void CAssignmentView::drawPie(CDC *pDC)

{

CPen pen; // Variable declaration

pen.CreatePen(PS_SOLID, 0, RGB(0,0,0)); // Function call

pDC->SelectObject(&pen); // Function Call using pointer double rad=radius; // Initialize value of rad variable of type double with the value of radius double diff=rad/(noofst+1); // Declare and initialize variable diff with an expression.

// For loop to define components of chart using subject name. for(int i=0;i

{

int y1,y2,y3,y4; // Variables declaration

// calculate value of y1, y2, y3 and y4.

y1=(rad*cos(180.0*22.0/7.0/180.0))*1.001;

y2=(rad*sin(90.0*22.0/7.0/180.0))*0.99;

y3=(rad*cos(0.0*22.0/7.0/180.0))*1.001;

y4=(rad*sin(270.0*22.0/7.0/180.0))*0.99;

y1=cenx+y1;

y2=ceny-y2;

y3=cenx+y3;

y4=ceny-y4;

pDC->Ellipse(y1,y2,y3,y4); //Call function Ellipse using pointer

rad-=diff; // subtract values of rad and diff and assign to rad

138 //Assign values of y1, y2, y3 and y4 to student’s data.

stData[i].x1=y1;

stData[i].x2=y2;

stData[i].x3=y3;

stData[i].x4=y4;

}

//Assign new values rad=radius; diff = rad/(noofst+1); double theta,tdiff=360.0/noofsb; // Declare variables theta and initialize variable tdiff theta=tdiff; //Assign value of tdiff to theta

// For loop to define components of chart using subject marks. for(i=0;i

{

int y1,y2,y3,y4;

y1=rad*cos(theta*22.0/7.0/180.0);

y2=rad*sin(theta*22.0/7.0/180.0);

// Check condition if value of y1 is greater than 0 then increment 2 in the value of y1 otherwise decrement 2 from the value of y1.

if(y1>0) y1+2;

else y1-=2;

// Check condition if value of y2 is greater than 0 then increment 2 in the value of y2 otherwise decrement 2 from the value of y2.

if(y2>0) y2+2;

else y2-=2;

139

y1=cenx+y1;

y2=ceny-y2;

y3=diff*cos(theta*22.0/7.0/180.0);

y4=diff*sin(theta*22.0/7.0/180.0);

// Check condition if value of y3 is greater than 0 then decrement 2 from the value of y3 otherwise increment 2 to the value of y3.

if(y3>0) y3-=2;

else y3+=2;

// Check condition if value of y4 is greater than 0 then decrement 2 from the value of y4 otherwise increment 2 to the value of y4.

if(y4>0) y4-=2;

else y4+=2;

y3=cenx+y3;

y4=ceny-y4;

// functions call by Value using

pointer pDC->MoveTo(y3,y4);

pDC->LineTo(y1,y2);

theta+=tdiff; //Add values of theta and tdiff to theta.

}

//Assign new values

rad=radius;

tdiff=360.0/noofsb;

theta=0.0;

// nested For loop to draw chart and fill colors

for(i=0;i

for(int j=0;j

140 double perce= (double)stData[i].cob.snumber[j]/(double)stData[i].cob.tsnumber[j];

double reper=tdiff*(perce/2.0);

double reper2;

reper2=theta-reper;

reper=(theta+reper);

int ptcr1,ptcr2,ptcr3,ptcr4; int

ptcr5,ptcr6,ptcr7,ptcr8;

ptcr1=rad*cos(reper*22.0/7.0/180.0)*1.005;

ptcr2=rad*sin(reper*22.0/7.0/180.0)*1.005;

ptcr3=(rad-diff)*cos(reper*22.0/7.0/180.0)*0.985;

ptcr4=(rad-diff)*sin(reper*22.0/7.0/180.0)*0.985;

ptcr5=rad*cos(reper2*22.0/7.0/180.0)*1.005;

ptcr6=rad*sin(reper2*22.0/7.0/180.0)*1.005;

ptcr7=(rad-diff)*cos(reper2*22.0/7.0/180.0)*0.985;

ptcr8=(rad-diff)*sin(reper2*22.0/7.0/180.0)*0.985;

ptcr1=cenx+ptcr1;

ptcr2=ceny-ptcr2;

ptcr3=cenx+ptcr3;

ptcr4=ceny-ptcr4;

ptcr5=cenx+ptcr5;

ptcr6=ceny-ptcr6;

ptcr7=cenx+ptcr7;

ptcr8=ceny-ptcr8;

pDC->MoveTo(ptcr3,ptcr4);

pDC->LineTo(ptcr1,ptcr2);

141

pDC->MoveTo(ptcr7,ptcr8);

pDC->LineTo(ptcr5,ptcr6);

int x,y,x2,y2;

x=(rad-10)*cos((theta+((tdiff*perce)/4.0))*22.0/7.0/180.0);

y=(rad-10)*sin((theta+((tdiff*perce)/4.0))*22.0/7.0/180.0);

x=cenx+x;

y=ceny-y;

x2=(rad-10)*cos((theta-((tdiff*perce)/4.0))*22.0/7.0/180.0);

y2=(rad-10)*sin((theta-((tdiff*perce)/4.0))*22.0/7.0/180.0);

x2=cenx+x2;

y2=ceny-y2;

if(reper*tdiff>1){

if(!samecol){

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->FloodFill(x,y,RGB(0,0,0));

pDC->FloodFill(x2,y2,RGB(0,0,0));

}

else{

CBrush cbr(fcol[j]);

pDC->SelectObject(&cbr);

pDC->FloodFill(x,y,RGB(0,0,0));

pDC->FloodFill(x2,y2,RGB(0,0,0));

}

}

142 theta+=tdiff; // add values of theta and tdiff

}

rad-=diff; //subtract value of rad and diff

} colorconf(pDC); //Function prototype for color reference.

}

This function is used for color reference. void CAssignmentView::colorconf(CDC *pDC)

{

CRect cr;

GetClientRect(&cr);

CPen pen; int top,right,left,bottom; left=cr.right-30; top=cr.top+60; right=cr.right-10; bottom=cr.top+80; if(!samecol){

for(int i=0;i

{

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,stName[i]);

top+=30;

143 bottom+=30;

}

} else

{

for(int i=0;i

{

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,sbName[i]);

top+=30;

bottom+=30;

}

}

}

//Subject Class, its variable and methods class CSubject

{ public:

CString sname[10]; // Variable declare for Subject Name int snumber[10]; // Variable declare for Subject Numbers int tsnumber[10]; // Variable declare for Total Numbers

CSubject(); // Declare constructor

virtual ~CSubject(); //Declare a virtual Destructor

};

144

// Student Class, its variables and methods class CStudent

{ public:

CSubject cob; // variable declare of type CSubject

int x1,x2,x3,x4;

CStudent();

virtual ~CStudent();

};

// Student data input class with public inheritance. class CTreeDlg : public CDialog

{

// Construction public:

CTreeDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data

//{{AFX_DATA(CTreeDlg)

enum { IDD = IDD_DIALOG2 }; //enum creates new data type IDD.

CString m_name1;

CString m_name10;

CString m_name2;

CString m_name3;

CString m_name4;

CString m_name5;

145 CString m_name6;

CString m_name7;

CString m_name8;

CString m_name9;

//}}AFX_DATA

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CTreeDlg)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

// generated message map

functions

//{{AFX_MSG(CTreeDlg) virtual

BOOL OnInitDialog(); virtual void

OnOK(); //}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

CTreeDlg::CTreeDlg(CWnd* pParent /*=NULL*/)

: CDialog(CTreeDlg::IDD, pParent)

{

//{{AFX_DATA_INIT(CTreeDlg)

m_name1 = stName[0];

m_name10 = stName[9];

146 m_name2 = stName[1];

m_name3 = stName[2];

m_name4 = stName[3];

m_name5 = stName[4];

m_name6 = stName[5];

m_name7 = stName[6];

m_name8 = stName[7];

m_name9 = stName[8];

//}}AFX_DATA_INIT

}

void CTreeDlg::DoDataExchange(CDataExchange* pDX)

{

CDialog::DoDataExchange(pDX);

//{{AFX_DATA_MAP(CTreeDlg)

DDX_Text(pDX, IDC_EDIT1, m_name1);

DDX_Text(pDX, IDC_EDIT10, m_name10);

DDX_Text(pDX, IDC_EDIT2, m_name2);

DDX_Text(pDX, IDC_EDIT3, m_name3);

DDX_Text(pDX, IDC_EDIT4, m_name4);

DDX_Text(pDX, IDC_EDIT5, m_name5);

DDX_Text(pDX, IDC_EDIT6, m_name6);

DDX_Text(pDX, IDC_EDIT7, m_name7);

DDX_Text(pDX, IDC_EDIT8, m_name8);

DDX_Text(pDX, IDC_EDIT9, m_name9);

//}}AFX_DATA_MAP

}

147

BEGIN_MESSAGE_MAP(CTreeDlg, CDialog)

//{{AFX_MSG_MAP(CTreeDlg)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CTreeDlg message handlers

BOOL CTreeDlg::OnInitDialog()

{

CDialog::OnInitDialog();

int R_NO=1027;

// TODO: Add extra initialization

here for(int i=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

R_NO=1017;

// TODO: Add extra initialization

here for(i=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

148 return TRUE; // return TRUE unless you set the focus to a control

// EXCEPTION: OCX Property Pages should return FALSE

}

void CTreeDlg::OnOK()

{

// TODO: Add extra validation here

UpdateData(TRUE);

stName[0]=m_name1;

stName[1]=m_name2;

stName[2]=m_name3;

stName[3]=m_name4;

stName[4]=m_name5;

stName[5]=m_name6;

stName[6]=m_name7;

stName[7]=m_name8;

stName[8]=m_name9;

stName[9]=m_name10;

CDialog::OnOK();

}

Subject data input class class CSubName : public CDialog

{

// Construction public:

149 CSubName(CWnd* pParent = NULL); // standard constructor

// Dialog Data

//{{AFX_DATA(CSubName)

enum { IDD = IDD_DIALOG4 };

CString m_sub1;

CString m_sub10;

CString m_sub2;

CString m_sub3;

CString m_sub4;

CString m_sub5;

CString m_sub6;

CString m_sub7;

CString m_sub8;

CString m_sub9;

//}}AFX_DATA

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CSubName)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

150

// Generated message map functions

//{{AFX_MSG(CSubName) virtual

BOOL OnInitDialog(); virtual void

OnOK(); //}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

151 Appendix - D

Computer Program for Framed Component Bar Chart

Driver.java public class Driver {

// declare data members static Family families[]=new Family[10]; //creating static object of class Family static int it; static int fm; static void init() // static function definition { for(int j=0;j<10;j++) { families[j]=new Family(); //creating new array of class Family using for loop } } public static void main(String args[]) // main function { init(); // function call new input().setVisible(true); // set output screen to be visible }

} Family.java public class Family {

// Declare data members Item items[]; String name; static int i=65; public Family() // public constructoor { items=new Item[10]; // declare a new array Item.i=65; // assign value 65 to variable i

// for loop to set items vale. for(int j=0;j<10;j++) { items[j]=new Item();

152 items[j].value=j*10; } // assign value to variable name. name=String.valueOf((char)i); name="Family "+name; i++; } } FCBC.java import java.awt.Color; import java.awt.Font; import java.awt.GridLayout; import java.awt.LayoutManager; import javax.swing.JLabel; import javax.swing.JProgressBar;

public class FCBC extends javax.swing.JFrame {

/** creates new form FCBC */ public FCBC() { initComponents(); //setting grid layout of 10 rows and 11 columns GridLayout abc=new GridLayout(10, 11); // function call to set vertical & horizontal lines abc.setVgap(15); abc.setHgap(10); // function call to set layout jPanel1.setLayout(abc); setvalues(); // function call to set values }

@SuppressWarnings("unchecked") // //GEN- BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel();

// set close option to close output screen setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Your Graph!"); // title of output screen // graph title should be on top left corner and user can’t resize output screen setAlwaysOnTop(true); setResizable(false);

// Set background of graph to fill colors jPanel1.setBackground(new java.awt.Color(0, 153, 153));

153 jPanel1.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED, new java.awt.Color(51, 51, 51), new java.awt.Color(212, 208, 200), null, null));

// set graph Layout javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 1007, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 684, Short.MAX_VALUE) );

// set Font and color and Alignment jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 36)); // NOI18N jLabel1.setForeground(new java.awt.Color(102, 0, 51)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cooltext449293711.gif"))); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 1013, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) );

pack(); }// //GEN-END:initComponents

/** * @param args the command line arguments */

154 public void setvalues() // Function definition to set values { int tempn; for(int j=0;j<10;j++) { if(j

} } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; // End of variables declaration//GEN-END:variables

}

// Display graph making option using wizard containing labels, combo boxes and buttons Input.java import javax.swing.JOptionPane; public class input extends javax.swing.JFrame {

/** Creates new form to input */ public input() {

155 initComponents(); }

/** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // //GEN- BEGIN:initComponents private void initComponents() {

// creating objects for Labels, Combo box & buttons jLabel1 = new javax.swing.JLabel(); jComboBox1 = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); jComboBox2 = new javax.swing.JComboBox(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jLabel3 = new javax.swing.JLabel();

//set close option setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("FCBC Graph Making Wizard"); // Display title on screen setResizable(false);

// display text for Label1 and set its font and color jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 14)); jLabel1.setForeground(new java.awt.Color(102, 0, 102)); jLabel1.setText("Select Total Number of Items"); // assign values to ComboBox1 and set background color jComboBox1.setBackground(new java.awt.Color(204, 255, 255)); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "3", "4", "5", "6", "7", "8", "9", "10" }));

// display text for Label2 and set its font and color jLabel2.setFont(new java.awt.Font("Trebuchet MS", 1, 14)); jLabel2.setForeground(new java.awt.Color(102, 0, 102)); jLabel2.setText("Select Number of Families Under Observation");

// assign values to ComboBox2 and set background color jComboBox2.setBackground(new java.awt.Color(204, 255, 255)); jComboBox2.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "2", "3", "4", "5", "6", "7", "8", "9", "10" }));

// set Proceed button icon, font and color jButton1.setBackground(new java.awt.Color(0, 102, 102)); jButton1.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); jButton1.setForeground(new java.awt.Color(0, 51, 102));

156 jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Proceed_12200.gif"))); // NOI18N // set action performed when clicked jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

// set Cancel button icon, font and color jButton2.setBackground(new java.awt.Color(0, 102, 102)); jButton2.setFont(new java.awt.Font("Comic Sans MS", 1, 14)); jButton2.setForeground(new java.awt.Color(0, 51, 102)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Cancel_11738.gif"))); // NOI18N // set gap between buttons and action performed when clicked jButton2.setIconTextGap(0); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

// set Label3 icon and set its font, alignment and color jLabel3.setFont(new java.awt.Font("Monotype Corsiva", 1, 24)); jLabel3.setForeground(new java.awt.Color(51, 51, 0)); jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/cooltext449291783.gif"))); // NOI18N

// set output screen Layout javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addGap(68, 68, 68) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 173, Short.MAX_VALUE) .addGap(75, 75, 75) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(26, 26, 26) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

157

.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 284, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 319, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 87, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(78, 78, 78)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(49, 49, 49)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(41, 41, 41)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jComboBox2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(93, 93, 93)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 33, Short.MAX_VALUE) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 33, Short.MAX_VALUE)) .addContainerGap())

158 ); pack(); }// //GEN-END:initComponents

// perform Button1 action on click private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton1ActionPerformed // assign selected values of ComboBoxes to objects. Driver.it=Integer.parseInt((String)jComboBox1.getSelectedItem()); Driver.fm=Integer.parseInt((String)jComboBox2.getSelectedItem()); dispose(); //new FCBC().setVisible(true); new input2().setVisible(true);

}//GEN-LAST:event_jButton1ActionPerformed

// perform Button2 action on click and display message. private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton2ActionPerformed // assign conformation action to option int option=JOptionPane.showConfirmDialog(null, "Are You Sure you want to Leave FCBC Wizard?"); // check if option value is 0 then display message and exit if(option==0) { JOptionPane.showMessageDialog(null, "Thank You for Using FCBC Graph Maker!","FCBC Wizard", 1); System.exit(0); } }//GEN-LAST:event_jButton2ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JComboBox jComboBox1; private javax.swing.JComboBox jComboBox2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; // End of variables declaration//GEN-END:variables

}

// Display graph making option using wizard containing labels, text boxes and buttons Input2.java import java.awt.Font; import java.awt.GridLayout; import javax.swing.JLabel; import javax.swing.JTextField;

159 public class input2 extends javax.swing.JFrame { // declare text fields JTextField jtext1[]; JTextField jtext2[];

/** Creates new form to input */ public input2() { initComponents(); // creating objects of text fields jtext1=new JTextField[Driver.it]; jtext2=new JTextField[Driver.fm]; // set Layout jPanel1.setLayout(new GridLayout(22, 1)); jPanel2.setLayout(new GridLayout(Driver.fm, 1)); setvalues(); // function call to set values } void setvalues() // function definition to set values { jPanel1.add(new JLabel("Please Enter Item Names")); // display label to input item names // for loop to add item names for(int j=0;j

//display label to input families names jPanel1.add(new JLabel("Please Enter Families Names")); // for loop to add families names for(int j=0;j8) { Driver.families[i].name=Driver.families[i].name.substring(0, 9);

160 }

} // for loop to assign item names to array for(int j=0;j8) { Driver.families[i].items[j].name=Driver.families[i].items[j].name.substring(0, 9); } } } } }

@SuppressWarnings("unchecked") // //GEN- BEGIN:initComponents private void initComponents() {

// creating objects for Labels & buttons jPanel1 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton();

//set close option setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

//set output screen Layout javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 188, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 415, Short.MAX_VALUE) );

// set Ok button icon and color jButton1.setBackground(new java.awt.Color(153, 204, 255)); jButton1.setForeground(new java.awt.Color(153, 204, 255)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/14627.gif"))); // NOI18N // set action performed when clicked jButton1.addActionListener(new java.awt.event.ActionListener() {

161 public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

// set Back button icon and color jButton2.setBackground(new java.awt.Color(153, 204, 255)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Back_14565.gif"))); // NOI18N // set action performed when clicked jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

// set output screen Layout javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(20, 20, 20) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(35, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 82, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(jButton2) .addGap(20, 20, 20)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 17, Short.MAX_VALUE)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jButton2) .addComponent(jButton1))

162 .addContainerGap()) ); pack(); }// //GEN-END:initComponents

// perform Button1 action on click private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton1ActionPerformed // functions call initialize(); dispose(); new input3().setVisible(true);// TODO add your handling code here: }//GEN-LAST:event_jButton1ActionPerformed

// perform Button2 action on click private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton2ActionPerformed dispose(); new input().setVisible(true); }//GEN- LAST:event_jButton2ActionPerformed

/** * @param args the command line arguments */

// main function public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() // function to run input2 method { new input2().setVisible(true); } }); }

// Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JPanel jPanel1; // End of variables declaration//GEN-END:variables

}

Input3.java import java.awt.Color; import java.awt.Font; import java.awt.GridLayout;

163 import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JTextField; public class input3 extends javax.swing.JFrame {

// declare text field JTextField jtext[][];

/** Creates new form for input3 */ public input3() { // creating object of text field jtext=new JTextField[Driver.it][Driver.fm]; initComponents(); // set Layout jPanel1.setLayout(new GridLayout(11, 11)); setvalues(); // function call to set values

} void setvalues() // function definition to set values { jPanel1.add(new JLabel()); // function call to add new label // for loop to set families names for(int k=0;k<10;k++) { JTextField temp=new JTextField(12); temp.setText(Driver.families[k].name); temp.setEditable(false); // set edit option to false // set alignment color temp.setHorizontalAlignment((int)CENTER_ALIGNMENT); temp.setForeground(Color.BLUE); temp.setBackground(Color.LIGHT_GRAY); jPanel1.add(temp); // function call to add components } // for loop to add family item name for(int i=0;i<10;i++) { // check if loop variable is less than items then add name if(i

164

// check if inner loop variable is less than families and outer loop variable is less than items then add text to graph if(j100) { JOptionPane.showMessageDialog(null,"Percentage cannot be greater than 100"); return false; } }

} return true;

} boolean initialize() // function to initialize values { // outer for loop for families for(int i=0;i

165

// inner for loop for items for(int j=0;j

} return true; }

@SuppressWarnings("unchecked") // //GEN- BEGIN:initComponents private void initComponents() {

// creating objects for Labels & buttons jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton();

//set close option setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

//set output screen Layout javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGap(0, 923, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

166 .addGap(0, 329, Short.MAX_VALUE) );

// display text for Label1 and set its font, alignment and color jLabel1.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); jLabel1.setForeground(new java.awt.Color(0, 102, 102)); jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); jLabel1.setText("Item");

// display text for Label2 and set its font, alignment and color jLabel2.setFont(new java.awt.Font("Trebuchet MS", 1, 24)); jLabel2.setForeground(new java.awt.Color(0, 102, 102)); jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel2.setText("Percentage expenditure");

// set Ok button icon and color jButton1.setBackground(new java.awt.Color(153, 204, 255)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/14627.gif"))); // NOI18N // set text and action performed when clicked jButton1.setText("ok"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } });

// set Back button icon and color jButton2.setBackground(new java.awt.Color(153, 204, 255)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Back_14565.gif"))); // NOI18N // set text and action performed when clicked jButton2.setText("Cancel"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } });

// set output screen Layout javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)

167

.addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createSequentialGroup() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)

.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)

.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 767, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup()

.addGap(301, 301, 301) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18)

.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap())

); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap()

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 43, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(8, 8, 8)

.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap()) ); pack(); }// //GEN-END:initComponents

// perform Button1 action on click private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton1ActionPerformed // check if values are initialized and valid then display graph if(initialize()) { if(valid()) { dispose();

168 new FCBC().setVisible(true); }

} }//GEN-LAST:event_jButton1ActionPerformed

// perform Button2 action on click private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN- FIRST:event_jButton2ActionPerformed dispose(); new input2().setVisible(true); }//GEN- LAST:event_jButton2ActionPerformed

/** * @param args the command line arguments */

// main function public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { public void run() // function to run input2 method { new input3().setVisible(true); } }); }

// Variables declaration - do not modify private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JPanel jPanel1; // End of variables declaration// } Item.java

// public class for Items public class Item { // declare class members String name; int value; static int i=65;

Item() // constructor { name=String.valueOf((char)i); // assign value to name name="Item "+name; i++; }}

169 Appendix - E

Computer Program for Framed Boxes

Function to Draw Cube and slices

// Function Define as DrawCube of class CAssignmentView with two parameters void CAssignmentView::DrawCube(CDC *pDC,double theta)

{

CPoint po1,po2, po3; // Variable declaration

CPen gpen(0,1,RGB(0,0,0)); // Function Declaration pDC->SelectObject(&gpen); // Function Call using pointer

// set values of x, y, and z-planes

// functions call by value and store result in variables. po1=Translate2D(0,0,0,theta); po2=Translate2D(nx,0,0,theta);

// Pass value of variables to other functions using pointer pDC->MoveTo(po1); pDC->LineTo(po2); po1=Translate2D(nx,ny,0,theta); // functions call by new values and store result in variable pDC->LineTo(po1); // Pass value of variable to other function using pointer po1=Translate2D(nx,ny,nz,theta); pDC->LineTo(po1); po1=Translate2D(nx,0,nz,theta); pDC->LineTo(po1); po1=Translate2D(nx,0,0,theta); pDC->LineTo(po1); po1=Translate2D(0,0,0,theta); po2=Translate2D(0,0,nz,theta);

170 pDC->MoveTo(po1); pDC->LineTo(po2); po1=Translate2D(0,ny,nz,theta); pDC->LineTo(po1); po1=Translate2D(nx,ny,nz,theta); pDC->LineTo(po1); po1=Translate2D(nx,0,nz,theta); pDC->LineTo(po1); po1=Translate2D(0,0,nz,theta); pDC->LineTo(po1); xdiff=nx/noofst; // calculate value for xdiff

// for loop to draw x-axis for(int i=1;i

{

po1=Translate2D(xdiff*i,0,0,theta);

po2=Translate2D(xdiff*i,0,nz,theta);

pDC->MoveTo(po1); pDC-

>LineTo(po2);

po1=Translate2D(xdiff*i,ny,nz,theta);

pDC->LineTo(po1);

} zdiff=nz/(noofsb-nooftp-1); // calculate value for zdiff

// for loop to draw z-axis

for(i=1;i

{

po1=Translate2D(0,0,zdiff*i,theta);

po2=Translate2D(nx,0,zdiff*i,theta);

171 pDC->MoveTo(po1);

pDC->LineTo(po2);

po1=Translate2D(nx,ny,zdiff*i,theta);

pDC->LineTo(po1);

} ydiff=ny/nooftp; // calculate value for ydiff

// for loop to draw y-axis

for(i=1;i

{

po1=Translate2D(0,ydiff*i,nz,theta);

po2=Translate2D(nx,ydiff*i,nz,theta);

pDC->MoveTo(po1); pDC-

>LineTo(po2);

}

CPen fpen(0,0,RGB(0,0,0)); // Function declaration pDC->SelectObject(&fpen); //function call with reference using pointer

// Set font of graph.

CFont m_fFont1;

m_fFont1.CreateFont(

10, // nHeight

5, // nWidth

0, // nEscapement

0, // nOrientation

FW_BOLD, // nWeight

FALSE, // bItalic

FALSE, // bUnderline

0, // cStrikeOut

172 ANSI_CHARSET, // nCharSet

OUT_DEFAULT_PRECIS, // nOutPrecision

CLIP_DEFAULT_PRECIS, // nClipPrecision

DEFAULT_QUALITY, // nQuality

DEFAULT_PITCH | FF_SWISS, // nPitchAndFamily

_T("Arial")); // lpszFacename

pDC->SelectObject(m_fFont1); // Function call by value

// nested for loop to set components for graph for(i=0;i

{

double xdiffsub=((double)stData[i].cob.snumber[0]/(double)stData[i].cob.tsnumber[i]);

po1=Translate2D((double)(xdiff*i)+((double)xdiffsub*(double)xdiff),0,0,theta);

po2=Translate2D((double)(xdiff*i)+((double)xdiffsub*(double)xdiff),0,nz,theta);

pDC->MoveTo(po2);

po1=Translate2D((double)(xdiff*i)+((double)xdiffsub*(double)xdiff),ny,nz,theta) ;

for(int j=1;j

{

double zdiffsub=((double)stData[i].cob.snumber[j]/(double)stData[i].cob.tsnumber[j]);

po1=Translate2D(double(xdiff*i),0,double(zdiff*(j- 1))+double(zdiffsub*zdiff),theta);

po2=Translate2D(double(xdiff*i)+double(xdiffsub*xdiff),0,double(zdiff*(j- 1))+double(zdiffsub*zdiff),theta);

173

po3=Translate2D(double(xdiff*i)+double(xdiffsub*xdiff),0,double(zdiff*(j- 1)),theta);

// check if color is not same then fill rectangle according to outer loop variable.

if(!samecol){

CBrush cbr(fcol[i]);

//pDC->SelectObject(&cbr);

pDC- >FillRect(CRect(po1.x,po1.y,po3.x,po3.y),&cbr);

}

// otherwise fill rectangle according to inner loop

variable else{

CBrush cbr(fcol[j]); pDC-

>SelectObject(&cbr);

pDC- >FillRect(CRect(po1.x,po1.y,po3.x,po3.y),&cbr);

}

CPoint xx; // variable declare of class CPoint

// check if loop variable is equal to zero then calculate value of xx and print values

if(i==0)

{

xx=Translate2D(-50,0,(zdiff*(j-1))+(zdiff*0.5),theta);

pDC->TextOut(xx.x,xx.y,sbName[j]);

}

}

for(int k=0;k

{ double ydiffsub=((double)stData[i].cob.snumber[noofsb- nooftp+k]/(double)stData[i].cob.tsnumber[noofsb-nooftp+k]);

174 po1=Translate2D(double(xdiff*i),double(ydiff*k)+double(ydiffsub*ydiff),nz,theta); po2=Translate2D(double(xdiff*i)+double(xdiffsub*xdiff),double(ydiff*k)+double(ydiffs ub*ydiff),nz,theta);

po3=Translate2D(double(xdiff*i)+double(xdiffsub*xdiff),double(ydiff*k),nz,thet a);

pDC->MoveTo(po1);

pDC->LineTo(po2);

pDC->LineTo(po3);

int x=(xdiff*i)+(xdiff*xdiffsub*0.5);

int y=(ydiff*k)+(ydiff*ydiffsub*0.5);

int z=nz;

CPoint xx=Translate2D(x,y,z,theta);

if(!samecol){

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->FloodFill(xx.x,xx.y,RGB(0,0,0));

}

else{

CBrush cbr(fcol[noofsb-nooftp+k]);

pDC->SelectObject(&cbr);

pDC->FloodFill(xx.x,xx.y,RGB(0,0,0));

}

if(i==0)

{

xx=Translate2D(- 50,(ydiff*k)+(ydiff*0.5),z,theta);

pDC->TextOut(xx.x,xx.y,sbName[noofsb- nooftp+k]);

175 }

}

CPoint xxx;

xxx=Translate2D(xdiff*i,0,-10,theta);

pDC->TextOut(xxx.x,xxx.y,stName[i]);

}

CPoint xxx;

xxx=Translate2D(nx/2.0,0,-30,theta);

CString str; // declare string type variable

str="<------"+sbName[0]; // assign value to variable

str+="------>";

pDC->TextOut(xxx.x,xxx.y,str); // function call to print values. // colorRef(pDC); function prototype for color reference

}

// Function to convert (mapping) 3D point to 2D plane

// Function Define as Translate2D of class CAssignmentView

CPoint CAssignmentView::Translate2D (int x, int y, int z, double theta)

{// Check if no of subjects is greater than 5 then calculate value of z-axis

if(noofsb>5)

{

z=z-(noofsb-5)*80;

}

CPoint pos; // Declare variable pos of class CPoint

// calculate values of x & y-axis

pos.x=cx+(x+y*cos(theta*22.0/7.0/180.0));

pos.y=cy-(z+y*sin(theta*22.0/7.0/180.0));

176 return pos; // return value to pos to calling function.

}

// Color Filing for reference

// Function Define as colorRef of class CAssignmentView void CAssignmentView::colorRef(CDC *pDC)

{ CRect cr; // variable declaration

GetClientRect(&cr);

// variables declare

CPen pen; int top,right,left,bottom;

// setting components for graph left=cr.right+300-30; top=cr.top+60; right=cr.right+300; bottom=cr.top+80;

// Check if color is not same then draw graph according to subject name if(!samecol){

// for loop to draw rectangle and fill color on it. for(int i=0;i

{

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,stName[i]);

top+=30;

bottom+=30;

177 }

}

// otherwise draw graph according to subject

numbers else

{

for(int i=0;i

{

CBrush cbr(fcol[i]);

pDC->SelectObject(&cbr);

pDC->Rectangle(left,top,right,bottom);

pDC->FloodFill(left+3,top+3,RGB(0,0,0));

pDC->TextOut(left-50,top+5,sbName[i]);

top+=30;

bottom+=30;

}

}

}

// Subject Class, its variable and methods

class CSubject

{

public:

CString sname[10]; // declare array for Subject Name int snumber[10]; // declare array for Subject Numbers

int tsnumber[10]; // declare array for Subject Total Numbers

CSubject(); // declare constructor

virtual ~CSubject(); //Declare a virtual Destructor

};

178 //Student Class, its variables and methods class CStudent

{ public:

CSubject cob; // variable declare of type CSubject

int x1,x2,x3,x4;

CStudent();

virtual ~CStudent();

};

// Student data input class with public inheritance. class CTreeDlg : public CDialog

{

// Construction public:

CTreeDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data

//{{AFX_DATA(CTreeDlg)

enum { IDD = IDD_DIALOG2 }; //enum creates new data type IDD.

CString m_name1;

CString m_name10;

CString m_name2;

CString m_name3;

CString m_name4;

CString m_name5;

CString m_name6;

179 CString m_name7;

CString m_name8;

CString m_name9;

//}}AFX_DATA

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CTreeDlg)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

// Generated message map functions

//{{AFX_MSG(CTreeDlg) virtual

BOOL OnInitDialog(); virtual void

OnOK();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

CTreeDlg::CTreeDlg(CWnd* pParent /*=NULL*/)

: CDialog(CTreeDlg::IDD, pParent)

{

//{{AFX_DATA_INIT(CTreeDlg)

m_name1 = stName[0];

m_name10 = stName[9];

m_name2 = stName[1];

180 m_name3 = stName[2];

m_name4 = stName[3];

m_name5 = stName[4];

m_name6 = stName[5];

m_name7 = stName[6];

m_name8 = stName[7];

m_name9 = stName[8];

//}}AFX_DATA_INIT

}

void CTreeDlg::DoDataExchange(CDataExchange* pDX)

{

CDialog::DoDataExchange(pDX);

//{{AFX_DATA_MAP(CTreeDlg)

DDX_Text(pDX, IDC_EDIT1, m_name1);

DDX_Text(pDX, IDC_EDIT10, m_name10);

DDX_Text(pDX, IDC_EDIT2, m_name2);

DDX_Text(pDX, IDC_EDIT3, m_name3);

DDX_Text(pDX, IDC_EDIT4, m_name4);

DDX_Text(pDX, IDC_EDIT5, m_name5);

DDX_Text(pDX, IDC_EDIT6, m_name6);

DDX_Text(pDX, IDC_EDIT7, m_name7);

DDX_Text(pDX, IDC_EDIT8, m_name8);

DDX_Text(pDX, IDC_EDIT9, m_name9);

//}}AFX_DATA_MAP

}

181

BEGIN_MESSAGE_MAP(CTreeDlg, CDialog)

//{{AFX_MSG_MAP(CTreeDlg)

//}}AFX_MSG_MAP

END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////

// CTreeDlg message handlers

BOOL CTreeDlg::OnInitDialog()

{

CDialog::OnInitDialog();

int R_NO=1027;

// TODO: Add extra initialization

here for(int i=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

R_NO=1017;

// TODO: Add extra initialization

here for(i=0;i

GetDlgItem(R_NO+i)->EnableWindow(TRUE);

for(i=noofst;i<10;i++)

GetDlgItem(R_NO+i)->EnableWindow(FALSE);

return TRUE; // return TRUE unless you set the focus to a control

// EXCEPTION: OCX Property Pages should return FALSE

182 } void CTreeDlg::OnOK()

{

// TODO: Add extra validation here

UpdateData(TRUE);

stName[0]=m_name1;

stName[1]=m_name2;

stName[2]=m_name3;

stName[3]=m_name4;

stName[4]=m_name5;

stName[5]=m_name6;

stName[6]=m_name7;

stName[7]=m_name8;

stName[8]=m_name9;

stName[9]=m_name10;

CDialog::OnOK();

}

// Subject data input class class CSubName : public CDialog

{

// Construction public:

CSubName(CWnd* pParent = NULL); // standard constructor

183 // Dialog Data

//{{AFX_DATA(CSubName)

enum { IDD = IDD_DIALOG4 };

CString m_sub1;

CString m_sub10;

CString m_sub2;

CString m_sub3;

CString m_sub4;

CString m_sub5;

CString m_sub6;

CString m_sub7;

CString m_sub8;

CString m_sub9;

//}}AFX_DATA

// Overrides

// ClassWizard generated virtual function overrides

//{{AFX_VIRTUAL(CSubName)

protected:

virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support

//}}AFX_VIRTUAL

// Implementation protected:

// Generated message map functions

184 //{{AFX_MSG(CSubName)

virtual BOOL OnInitDialog();

virtual void OnOK();

//}}AFX_MSG

DECLARE_MESSAGE_MAP()

};

185 REFERENCES

Abbott, E. A. (1884). Flatland: A Romance of Many Dimensions. Buccaneer Books, Cutchogue, NY.

Abdi, H. and Williams, L. J. (2010). Tukey’s Honestly Significant Difference (HSD) Test. Encyclopedia of Research Design, Neil Salkind (Ed.), Sage, Thousand Oaks, CA.

Andrews, H. P., Snee, R. D. and Sarner, M. H. (1980). Graphical Display of Means. The American , 34(4), 195-199.

Anscombe, F. J. (1973). Graphs in Statistical Analysis. The American Statistician, 27(1), 17-21.

Baker, R. (1833). Report of the Leeds Board of Health. British Library, London, 10347. ee. 17(8).

Becker, R. A. and Cleveland, W. S. (1987). Brushing Scatterplots. Technometrics, 29(2), 127-142.

Benjamini, Y. (1988). Opening the Box of a Boxplot. The American Statistician, 42(4), 257- 262.

Bowley, A. L. (1901). Elements of Statistics. P. S. King and Son, London.

Buache, P. (1752). Essai de Géographie Physique, Mémoires de ĺ Académie Royale des Sciences pp. 399-416. Bibliothéque Nationale de France, Paris (Tolbiac): Ge, FF- 8816-8822.

Carmer, S. G. and Swanson, M. R. (1973). Evaluation of Ten Pairwise Multiple Comparison Procedures by Monte Carlo Methods. Journal of the American Statistical Association, 68(314), 66-74.

Chambers, J. M., Cleveland, W. S., Kleiner, B. and Tukey, P. A. (1983). Graphical Methods for Data Analysis. Chapman and Hall, New York.

Chaudhry, S. M. and Kamal, S. (1996). Introduction to Statistical Theory Part II. 6th ed, Ilmi Kitab Khana, Lahore-54000, Pakistan.

Chen, C., Härdle, W. and Unwin, A. (2008). Handbook of Data Visualization. Springer.

Chernoff, H. (1973). The Use of Faces to Represent Points in K-Dimensional Space Graphically. Journal of the American Statistical Association, 68(342), 361-368.

Choonpradub, C. and McNeil, D. (2005). Can the Box Plot be improved? Songklanakarin J. Sci. Technol., 27(3), 649-657.

Cleveland, W. S. and McGill, R. (1984a). Graphical Perception: Theory, Experimentation and Application to the Development of Graphical Methods. Journal of the American Statistical Association, 79(387), 531-554.

186

Cleveland, W. S. and McGill, R. (1984b). The Many Faces of a Scatterplot. Journal of the American Statistical Association, 79(388), 807-822.

Cook, D., Lee, E. and Majumder, M. (2016). Data Visualization and Statistical Graphics in Big Data Analysis. Annu. Rev. Stat. Appl. 3:133–59.

Curran-Everett, D. (2000). Multiple Comparisons: Philosophies and Illustrations. American Journal of Physiology, 279(1), 1-8. de Witt, J. (1671).The Worth of Life Annuities Compared to Redemption Bonds. n.p., Leiden. du Carla-Boniface, M. (1782). Expression des Nivellements; ou, Méthode Nouvelle Pour Marquer sur les Cartes Terrestres et Marines les Hauteurs et les Configurations du Terrain. In François de Dainville, “From the Depths to the Heights,” translated by Arthur H. Robinson, Surveying and Mapping, 1970, 30, 389-403, on page 396.

Dupin, C. (1826). Carte Figurative de l’Instruction Populire de la France, Jobard. Bibliothéque Nationale de France, Paris ( Tolbiac): Ge C 6588. du Toit, S. H. C., Steyn, A. G. W. and Stumph, R. H. (1986). Graphical Exploratory Data Analysis. Springer-Verlag New York.

Few, S. (2012).Show Me the Numbers: Designing Tables and Graphs to Enlighten. Burlingame, CA: Analytics. 2nd ed.

Fisher, R. A. (1935). The . Edinburgh, Oliver and Boyd.

Friedman, V. (2008). Data Visualization and Infographics. Graphics, Monday Inspiration, January 14th.

Friendly, M. (1994). Mosaic Displays for Multi-Way Contingency Tables. Journal of the American Statistical Association, 89, 190-200.

Friendly, M. (2000). Re-Visions of Minard. Statistical Computing and Graphics Newsletter, 11(1), 13-19.

Friendly, M. (2002). A Brief History of the Mosaic Display. Journal of Computational and Graphical Statistics, 11(1), 89-107.

Friendly, M. and Denis, D. (2000). The Roots and Branches of Statistical Graphics. Journal de la Société Francaise de Statistique, 141(4), 51-60.

Friendly, M. and Denis, D. (2005). The Early Origins and Development of the Scatterplot. Journal of the History of the Behavioral Sciences, 41(2), 103-130.

Friendly, M. and Kwan, E. (2003). Effect Ordering for Data Displays. Computational Statistics and Data Analysis, 43(4), 509-539.

Frigge, M., Hoaglin, D. C. and Iglewicz, B. (1989). Some Implementations of the Boxplot. The American Statistician, 43(1), 50-54.

187 Frisius, R.G. (1533). Libellus de Locorum Describendorum Ratione, Antwerp.

Funkhouser, H. G. (1936). A Note on a Tenth Century Graph. Osiris, 1: 260-262.

Funkhouser, H. G. (1937). Historical Development of the Graphical Representation of Statistical Data. Osiris, 3(1), 269-405.

Galton, F. (1886). Regression towards Mediocrity in Hereditary Stature. Journal of the Anthropological Institute, 15: 246-263.

Galton, F. (1894). Results Derived From the Natality Table of Körösi by Employing the Method of Contours or Isogens. Journal of the Royal Statistical Society, 57(4), 702- 708.

Gelman, A., Pasarica, C. and Dodhia, R. (2002). Let's Practice What We Preach: Turning Tables into Graphs. The American Statistician, 56(2): 121-130.

Gelman, A., Unwin, A. (2013). Infovis and Statistical Graphics: Different Goals, Different Looks. J. Comput. Graph Stat. 22, 2–28.

Good, P. I., & Hardin, J. W. (2003). Common Errors in Statistics (and How to Avoid Them): John Wiley & Sons.

Graunt, J. (1662). Natural and Political Observations Mentioned in a Following Index and Made Upon the Bills of Mortality. Martin, Allestry, and Dicas, London.

Halley, E. (1686). On the Height of the Mercury in the Barometer at Different Elevations Above the Surface of the Earth, and on the Rising and Falling of the Mercury on the Change of Weather. Philosophical Transactions, 104-115.

Halley, E. (1701). The Description and Uses of a New and Correct Sea-Chart of the Whole World, Showing Variations of the Compass, London.

Hartigan, J. A. (1975). Printer Graphics for Clustering. Journal of Statistical Computation and Simulation, 4, 187-213.

Healy, K. and Moody, J. (2014). Data Visualization in Sociology. Annual Review of Sociology, 40, 105-128.

Hintze, J. L. and Nelson, R. D. (1998). Violin Plots: A Box Plot-Density Trace Synergism. The American Statistician, 52(2), 181-184.

Howard, L. (1800). On a Periodical Variation of the Barometer, Apparently Due to the Influence of the Sun and Moon on the Atmosphere. Philosophical Magazine, 7, 355-363.

Iqbal, M. M. (1999). Analysis of Long-Term Experiment on Cotton Using a Blend of Theoretical and New Graphical Methods to Study Treatment Effects over Time. Unpublished PhD Thesis, University of Kent at Canterbury, UK.

Iqbal, M. M. and Clarke, G. M. (1999). Tests for Residuals I: The Star Graph. Journal of Research (Science), 10(1 &2), 25-32.

188

Iqbal, M. M. and Clarke, G. M. (2003a). Profile Analysis in Agriculture. Journal of Pure and Applied Sciences, 22(1), 1-20.

Iqbal, M. M. and Clarke, G. M. (2003b). Visual Least-Significant-Difference and Visual Methods for Screening of Experimental Treatments for Large Number of Response Variable. Pakistan Journal of Applied Sciences, 3(5), 280-290.

Jevons, W. S. (1863). A Serious Fall in the Value of Gold Ascertained, and Its Social Effects Set Forth, London.

Jevons, W. S. (1879). Graphical Method. Principles of Science: A Treatise on Logic and Scientific Method. 3rd ed, Dover, New York, 492-496.

Joint Committee on Standards for Graphic Presentation (1914). Preliminary Report Published for the Purpose of Inviting Suggestions for the Benefit of the Committee. Publications of the American Statistical Association, 14(112), 790-797.

Kleiner, B. and Hartigan, J. A. (1981). Representing Points in Many Dimensions by Trees and Castles. Journal of the American Statistical Association, 76(374), 260 -269.

Lee, Y. (1995). Graphical Demonstration of an Optimality Property of the Median. The American Statistician, 49(4), 369-372.

McGill, R., Tukey, J.W. and Larsen, W. A. (1978). Variations of Box Plots. The American Statistician, 32(1), 12-16.

McNeil, D. (1992). On Graphing Paired Data. The American Statistician, 46(4), 307-311.

Minard, C.J. (1844). Tableaux Figuratifs de la Ciriculation de Quelques Chemins de fer, lith. (n.s.). Ѐcole Nationale des Ponts et Chaussées, Paris: 5860/C351, 5299/C307.

Minard, C.J. (1861). Des Tableaux Graphiques et des Cartes Figuratives, E. Thunot et Cie Paris. Ѐcole Nationale des Ponts et Chaussées, Paris: 3386/C161; Bibliothèque Nationale de France,Paris (Tolbiac): V-16168.

Montgomery, D. C. (1996). Design and Analysis of Experiments. 4th ed, John Wiley & Sons, New York.

Moseley, H. (1913). The High Frequency Spectra of the Elements. Philosophical Magazine, 1024.

Nawaz, M. (2004). Visual Method for Construction of Response Surface Designs. Unpublished M.Phil Thesis, Bahaudin Zakariya University, Multan, Pakistan.

Nightingale, F. (1857). Mortality of the British Army. Harrison and Sons, London.

Oresme, N. (1482). Tractatus de Latitudinibus Formarum, Padova. British Library, London: IA 3Q02.

Palaniswamy, U. R. and Palaniswamy, K. M. (2006). Handbook of Statistics for Teaching and Research in Plant and Crop Science. The Haworth Press, Binghamton, NY.

189

Petty, W. (1665). The Economic Writings of Sir William Petty: Together With the Observations Upon the Bills of Mortality. The University Press, Cambridge. C. H. Hall.

Playfair, W. (1786). Commercial and Political Atlas: Representing, By Copper-Plate Charts, the Progress of the Commerce, Revenues, Expenditure, and Debts of England, During the Whole of the Eighteenth Century. Corry, London.

Playfair, W. (1801). The Statistical Breviary. London.

Playfair, W. (1821). Letter on Our Agricultural Distresses, Their Causes and Remedies; Accompanied With Tables and Copperplate Charts Showing and Comparing the Prices of Wheat, Bread and Labour, From 1565 to 1821. British Library, London, 8275. c.64.

Priestley, J. (1765). A Chart of Biography, London. British Library, London, 611.1.19.

Qasim, H. M. (2006). Modeling Visually Balanced and Visually Unbalanced Fractions of Factorial Experiments: (A Comparison Thereof). Unpublished M.Phil Thesis, Bahauddin Zakariya University, Multan, Pakistan.

Rousseeuw, P. J., Ruts, I. and Tukey, J. W. (1999). The Bagplot: A Bivariate Boxplot. The American Statistician, 53(4), 382-387.

Smith, W. (1815). A Delineation of the Strata of England and Wales, with Part of the Scotland; Exhibiting the Collieries and Mines, the Marshes and Fenlands Originally Overflowed by the Sea, and the Varieties of Soil According to the Substrata, Illustratted by the Most Descriptive Names, John Cary, London. British Library, London: Maps 1180 (19).

Schmid, C. F. (1954).Handbook of Graphic Presentation. Ronald Press, New York.

Snow, J. (1855). On the of Communication of Cholera. 2nd ed, (n.p.), London.

Spence, I. (2005). No Humble Pie: The Origins and Usage of a Statistical Chart. Journal of Educational and Behavioral Statistics, 30 (4), 353-368.

Siirtola, H. (2014). Bars, Pies, Doughnuts & Tables: Visualization of Proportions. Paper presented at the Proceedings of the 28th International BCS Human Computer Conference (HCI 2014), Southport, UK.

Tufte, E. R. (1976). STATUS, A Monthly Chartbook of Social and Economic Trends. Unpublished Notes. Princeton University, U. S. Bureau of the Census, (August issue).

Tufte, E. R. (1983). The Visual Display of Quantitative Information. Graphics Press, Cheshire, CT.

Tufte, E. R. (1997). Visual Explanations. Graphics Press, Cheshire, CT.

Tukey, J. W. (1962). The Future of Data Analysis. Annals of Mathematical Statistics, 33, 1-67. Correction 812.

190

Tukey, J. W. (1970). Exploratory Data Analysis. Preliminary ed., Addison-Wesley, Reading, Mass.

Tukey, J. W. (1972). Some Graphic and Semigraphic Displays. in Statistical Papers in Honor of George W. Snedecor, ed. T. A. Bancroft, Ames, Iowa State University Press, 293-316.

Tukey, J. W. (1977). Exploratory Data Analysis. Addison-Wesley, Reading, Mass.

Tukey, J. W. (1990). Data-Based Graphics: Visual Display in the Decades to Come. Statistical Science, 5(3), 327-339. van Langren, M. F (1644), La Verdadera Longitud por Mar y Tierra, Antwerp: (n.p.). Ii +14 pp., folio; BL: 716.i.6. (2); BeNL: VB 5.275 C LP.

191