Author(s): Isabel Martín García.
Version: 1.11#222 (2004/5/24, 13:8:7 CEST)
Version of last change: 1.11#149 (2004/1/1, 14:19:37 CET)
This module defines predicates which show line graph widgets. All eight predicates exported by this module plot two-variable data. Each point is defined by its X-Y coordinate values. Every predicate share the following features:
XVectors (or XVs), YVectors (or YVs) and LAtts(6) contain this information. Those arguments must be lists whose elements are also lists. The first dataset is defined by the firts element of the three lists, the second dataset is defined by the second element of the three lists and so on.
attributes/1 type definition. Thus, the user can call each predicate in different ways ways.
" as the value of the argument.
error2 will be thrown. If the vectors contains elements but are not correct, the exception error4 will be thrown.
gengraph2):- use_module(library(gengraph2)).
gengraph2)
graph_b2(Header, GTitle, XTitle, XVectors, YTitle, YVectors, LAtts, Footer, Sm)
Besides the features mentioned at the begining of the module chapter, the displayed graph generated calling this predicate has the following distinguish characteristics:
Example:
graph_b2('This is the header text',
'Graph_title',
'xaxistitle',
[[20,30,59],[25,50]],
'yaxixtitle',
[[10,35,40],[25,50]],
[['line1','Blue','Yellow'],['line2']],
'footer',
'natural').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVectors is a list of vectors.
(basic_props:list/2)
YTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVectors is a list of vectors.
(basic_props:list/2)
LAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
gengraph1:smooth(Sm)
(gengraph1:smooth/1)
graph_b2(Header, GT, XT, XVs, XMax, XMin, YT, YVs, YMax, YMin, LAtts, Footer, Smooth)
In addition to the features brought up at the begining of the module chapter, this graph has the following:
Example:
graph_b2('This is the header text',
'Graph_title',
'xaxistitle',
[[20,10,59],[15,30,35]],
50,
_,
'yaxixtitle',
[[10,35,40],[25,50,60]],
50.5,
_,
[['line1','Blue','Yellow'],['line','MediumTurquoise','Plum']],
'footer',
'step').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(XMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(XMin)
(genbar1:axis_limit/1)
YT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(YMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(YMin)
(genbar1:axis_limit/1)
LAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
gengraph1:smooth(Smooth)
(gengraph1:smooth/1)
graph_w2(Header, GT, XT, XVectors, YTitle, YVectors, LAtts, Footer, Smooth)
This predicate is quite similar to
graph_b2/9. The difference lies in the graph appearance, as you can see below.
Example:
graph_w2('This is the header text',
'Graph_title',
'xaxistitle',
[[10,30,59],[25,50]],
'yaxixtitle',
[[10,35,40],[25,40]],
[['element1','Blue','DarkOrchid'],['element2','DarkOliveGreen',
'Firebrick']],
'footer',
'natural').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVectors is a list of vectors.
(basic_props:list/2)
YTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVectors is a list of vectors.
(basic_props:list/2)
LAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
gengraph1:smooth(Smooth)
(gengraph1:smooth/1)
graph_w2(Header, GT, XT, XV, XMax, XMin, YT, YVs, YMax, YMin, LAtts, Footer, Smooth)
This predicate is comparable to
graph_b2/13. The differences lie in the plot background color and in the cross hairs color, wich are white and black respectively.
Example:
graph_w2('This is the header text',
'Graph_title',
'xaxistitle',
[[10,30,59],[10,35,40]],
80,
_,
'yaxixtitle',
[[10,35,40],[25,50,60]],
50,
_,
[['element1','Blue','Green'],['element2','Turquoise','Black']],
'footer',
'linear').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XV is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(XMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(XMin)
(genbar1:axis_limit/1)
YT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(YMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(YMin)
(genbar1:axis_limit/1)
LAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
gengraph1:smooth(Smooth)
(gengraph1:smooth/1)
scattergraph_b2(Header, GT, XT, XVectors, YT, YVectors, PAtts, Footer)
Apart from the features brought up at the beginning of the chapter, the scatter graph displayed when invoking this predicate has the following features:
Example:
scattergraph_b2('This is the header text',
'Graph_title',
'xaxistitle',
[[10,15,20],[8,30,40]],
'yaxixtitle',
[[10,35,20],[15,11,21]],
[['element1','Blue','Yellow'],['element2','MediumTurquoise','Plum']],
'footer').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVectors is a list of vectors.
(basic_props:list/2)
YT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVectors is a list of vectors.
(basic_props:list/2)
PAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
scattergraph_b2(Header, GT, XT, XVs, XMax, XMin, YT, YVs, YMax, YMin, PAtts, Footer)
The particular features related to this predicate are described below:
Example:
scattergraph_b2('This is the header text',
'Graph_title',
'xaxistitle',
[[20,30,50],[18,40,59]],
50,
_,
'yaxixtitle',
[[10,35,40],[25,50,60]],
50,
_,
[['point dataset1'],['point dataset2']],
'footer').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(XMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(XMin)
(genbar1:axis_limit/1)
YT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(YMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(YMin)
(genbar1:axis_limit/1)
PAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
scattergraph_w2(Header, GTitle, XTitle, XVs, YTitle, YVs, PAtts, Footer)
This predicate is quite similar to
scattergraph_w1/8 except in the following:
Example:
scattergraph_w2('This is the header text',
'Graph_title',
'xaxistitle',
[[20,30,40,15,30,35,20,30]],
'yaxixtitle',
[[10,30,40,25,20,25,20,25]],
[['set1','cross',4]],
'footer').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
gengraph1:vector(XVs)
(gengraph1:vector/1)
YTitle is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVs is a list of vectors.
(basic_props:list/2)
PAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
scattergraph_w2(Header, GT, XT, XVs, XMax, XMin, YT, YVs, YMax, YMin, PAtts, Footer)
This predicate is comparable to
scattergraph_w2/13, the differences between them are listed below:
Example:
scattergraph_w2('This is the header text',
'Graph_title',
'xaxistitle',
[[20,10,59],[15,30,50]],
150,
5,
'yaxixtitle',
[[10,35,40],[25,20,60]],
_,
-10,
[['e1','Blue','Yellow'],['e2','MediumTurquoise','Plum']],
'footer').
Usage:
Header is a text (an atom) describing the header of the graph.
(genbar1:header/1)
GT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
XVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(XMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(XMin)
(genbar1:axis_limit/1)
YT is a text (an atom) to be used as label, usually not very long.
(genbar1:title/1)
YVs is a list of vectors.
(basic_props:list/2)
genbar1:axis_limit(YMax)
(genbar1:axis_limit/1)
genbar1:axis_limit(YMin)
(genbar1:axis_limit/1)
PAtts is a list of attributess.
(basic_props:list/2)
Footer is a text (an atom) describing the footer of the graph.
(genbar1:footer/1)
Go to the first, previous, next, last section, table of contents.