graphpite
[ class tree: graphpite ] [ index: graphpite ] [ all elements ]
Prev Next

Plot Layout

The Image_Graph Tutorial

Plot Layout

It is possible to add multiple plots to the same graph, not only withing the same plot, i.e. you can have 2 or more Image_Graph_Plotarea specified within the same graph.

The way Image_Graph handles this is utilizing the same method that Java does. This means that when you have 2 elements that you can layout onto the graph, you specify whether they are vertically or horizontally aligned (and at which percentage of the total width/height the split is positioned). This means that you define that "the area covered by this layout, shall be shared by this percentage between these 2 elements". An example:


1 ...
2 $Graph->add(
3 new Image_Graph_Layout_Vertical(
4 $PlotArea1 = new Image_Graph_Plotarea(),
5 $PlotArea2 = new Image_Graph_Plotarea()
6 75
7 )
8 );
9 ...

Layouts can be nested, so it is possble to define more than one arrangements:


1 ...
2 $Graph->add(
3 new Image_Graph_Layout_Vertical(
4 new Image_Graph_Layout_Horizontal(
5 $PlotArea1 = new Image_Graph_Plotarea(),
6 $PlotArea2 = new Image_Graph_Plotarea()
7 ),
8 $PlotArea3 = new Image_Graph_Plotarea(),
9 75
10 )
11 );
12 ...

Not only Image_Graph_Plotarea can be "layouted" all subclasses of the abstract class Image_Graph_Layout can be layouted. These are: Image_Graph_Plotarea, Image_Graph_Legend and Image_Graph_Title

Prev Up Next
Modifying appearance How to use Image_Graph Using Legends

Documentation generated on Wed, 15 Sep 2004 10:29:59 +0200 by phpDocumentor 1.2.3