Author(s): Isabel Martín.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.9#268 (2004/1/1, 14:15:51 CET)
This module defines predicates which depict barchart widgets. The three predicates exported by this module plot two-variable data as regular bars in a window and are similar to those exported in genbar2 module except in that those defined in this module doesn't display a legend. Thus, the user does not have to define legend element names.
The predicates test whether the format of the arguments is correct. If one or both vectors are empty, the exception error2
will be thrown. If the vectors contains elements but are not correct, the exception error1
or error3
will be thrown, depending on the error type. error1
means that XVector
and YVector
do not contain the same number of elements and error3
indicates that not all the XVector
elements contain a correct number of attributes .
genbar4
)genbar4
)
barchart4(Header, BarchartTitle, XTitle, XVector, YTitle, YVector, Footer)
As we mentioned in the above paragraph, this predicate is comparable to
barchart2/8
except in the XVector
argument type.
Example:
barchart4('This is the header text', 'Barchart without legend', 'My xaxistitle', [[2],[5],[6]], 'My yaxixtitle', [20,10,59], 'Numeric values in the xaxis').
barchart4(Hder, BT, XT, XVector, XMax, XMin, YT, YVector, YMax, YMin, Fter)
As we stated before, this predicate is quite similar to
barchart2/10
except in the following aspects:
XVector
argument type, because the yielded bar chart lacks the legend.
x
axis and y
axis.
Example:
barchart4('This is the header text, you can write a graph description', 'Barchart without legend', 'My xaxistitle', [[2,'Blue','Yellow','pattern1'], [20,'MediumTurquoise','Plum','pattern5'], [30,'MediumTurquoise','Green','pattern5']], 50, -10, 'My yaxixtitle', [20,10,59], 100, -10, 'Numeric values in the xaxis').
percentbarchart4(Header, BTitle, XTitle, XVector, YTitle, YVector, Footer)
The y axis maximum coordinate value is 100. The x axis limits are automatically worked out. This predicate is useful when the bar height represents percentages.
Example:
percentbarchart4('This is the header text', 'Barchart without legend', 'My xaxistitle', [[2,'Blue','Yellow','pattern1'],[5,'Yellow','Plum','pattern5'], [6,'MediumTurquoise','Green','pattern5']], 'My yaxixtitle', [20,10,59], 'Numeric values in the xaxis').
genbar4
)Defines the attributes of the bar.
XValue
ForegColor
BackgColor
SPattern
Go to the first, previous, next, last section, table of contents.