Chapter 4. Your first graph script

Table of Contents

4.1. Some words of caution
4.2. Graphing the number of sun spots during the 19th Century
4.2.1. The historic data
4.2.2. Preparing the data
4.2.3. A basic line graph
4.2.4. A basic bar graph

What you will learn in this chapter.  This chapter will illustrate how a basic line and bar graph can be created and it will also show how input data should be prepared so it can be read and used by the library.

Some words of caution

In order to quickly show a very first example we will create both a basic line graph and a basic bar graph that depicts the number of sun spots (a.k.a. solar flares) during the 19th century. The goal of this example is not to show every possible configuration and parameter supported by the library but rather show how simple it is to create a basic graph.

In the sections following this one we will describe more in details the idiosyncrasies about dynamic graph generation and JpGraph so even if you don't fully understand all the detail it will give a flavor of what is to come. As with all complex libraries one has to start somewhere and sometimes accept some practices without yet fully understand them. However, the goal of this manual is that after reading it through you will fully understand every single detail shown in this script.

So, without further due, let's start.