This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.
<html><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><title>Chapter4.Your first graph script</title><linkrel="stylesheet"type="text/css"href="manual.css"><metaname="generator"content="DocBook XSL Stylesheets V1.76.0"><linkrel="home"href="index.html"title="JpGraph Manual"><linkrel="up"href="pt02.html"title="PartII.Basic graph creation"></head><bodybgcolor="white"text="black"link="#0000FF"vlink="#840084"alink="#0000FF"><divclass="navheader"><tablewidth="100%"summary="Navigation header"><tr><thcolspan="3"align="center">Chapter4.Your first graph script</th></tr><tr><tdwidth="20%"align="left"></td><thwidth="60%"align="center">PartII.Basic graph creation</th><tdwidth="20%"align="right"></td></tr></table><hr></div><divclass="chapter"title="Chapter4.Your first graph script"><divclass="titlepage"><div><div><h2class="title"><aname="id2492877"></a>Chapter4.Your first graph script</h2></div></div></div><divclass="toc"><p><b>Table of Contents</b></p><dl><dt><spanclass="sect1"><ahref="ch04.html#id2492897">4.1. Some words of caution</a></span></dt><dt><spanclass="sect1"><ahref="ch04s02.html">4.2. Graphing the number of sun spots during the 19th Century</a></span></dt><dd><dl><dt><spanclass="sect2"><ahref="ch04s02.html#id2492934">4.2.1. The historic data</a></span></dt><dt><spanclass="sect2"><ahref="ch04s02.html#sec.preparing-sunspots-data">4.2.2. Preparing the data</a></span></dt><dt><spanclass="sect2"><ahref="ch04s02.html#id2492973">4.2.3. A basic line graph</a></span></dt><dt><spanclass="sect2"><ahref="ch04s02.html#id2493198">4.2.4. A basic bar graph</a></span></dt></dl></dd></dl></div>
<ptitle="What you will learn in this chapter">
<b>What you will learn in this chapter.</b>
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.
</p>
<divclass="sect1"title="Some words of caution"><divclass="titlepage"><div><div><h2class="title"style="clear: both"><aname="id2492897"></a>Some words of caution</h2></div></div></div>
<p>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.</p>
<p>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