This is gtkada_rm.info, produced by makeinfo version 4.5 from
gtkada_rm.texi.

INFO-DIR-SECTION User Interface Toolkit
START-INFO-DIR-ENTRY
* GtkAda_Rm: (gtkada_rm).           Ada95 graphical tookit based on GTK+ (Reference Manual)
END-INFO-DIR-ENTRY


File: gtkada_rm.info,  Node: Gtk.Extra.Plot Subprograms,  Prev: Gtk.Extra.Plot Types,  Up: Package_Gtk.Extra.Plot

Subprograms
===========

Creating a plot
---------------

procedure Gtk_New
       (Plot               : out    Gtk_Plot;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable
                            := Gdk.Drawable.Null_Drawable);

Create a new plot, that will be displayed in Drawable.
All the dataset, labels, axis,... associated with the plot will be drawn
in that drawable, which must have been created beforehand.   Note that
the drawable can also be set later with Set_Drawable.
procedure Gtk_New
       (Plot               : out    Gtk_Plot;
        Width              : in     Gdouble;
        Height             : in     Gdouble;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable
                            := Gdk.Drawable.Null_Drawable);

Create a new plot with a specific size.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Plot.
procedure Set_Drawable
       (Plot               : access Gtk_Plot_Record;
        Drawable           : in     Gdk.Drawable.Gdk_Drawable);

Modify the drawable on which the graphs are displayed.
From now on, all the drawings will be done on that drawable. Note that
they are not automatically copied to the new Drawable until the Plot
needs to be redrawn.
function Get_Drawable
       (Plot               : access Gtk_Plot_Record)
        return Gdk.Drawable.Gdk_Drawable;

Return the drawable on which the graphs are plotted.
procedure Set_Background
       (Plot               : access Gtk_Plot_Record;
        Background         : in     Gdk.Color.Gdk_Color);

Change the background for the plot.
Note that this has no effect if the plot has been set to transparent
(see the flags below).   The Plot is also redrawn as soon as you modify
this color.
procedure Set_Background_Pixmap
       (Plot               : access Gtk_Plot_Record;
        Pixmap             :        Gdk.Pixmap.Gdk_Pixmap);

Specificy a background pixmap to use for the plot
procedure Set_Transparent
       (Plot               : access Gtk_Plot_Record;
        Transparent        :        Boolean);

Whether the plot is transparent. If Transparent is True, all background
attributes are ignored (pixmap, color,...)
function Is_Transparent
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Whether the plot is current transparent
procedure Paint
       (Plot               : access Gtk_Plot_Record);

Force an immediate repaint of the widget in its pixmap.
The modification won't appear on the screen until you call Refresh.
It is probably not a good idea to call this function directly, and it
is more efficient to queue a draw request (see the Gtk.Widget package
for related functions).
procedure Refresh
       (Plot               : access Gtk_Plot_Record;
        Area               : in     Gdk.Rectangle.Gdk_Rectangle);

Copy the plot's pixmap to the screen.
The same comment as for Paint applies here, and you probably don't
have to call this function yourself, since queuing a draw request is
more efficient.
procedure Set_Magnification
       (Plot               : access Gtk_Plot_Record;
        Magnification      :        Gdouble);

Change the magnification level of the plot.
1.0 is the default magnification, higher values will zoom in while lower
values will zoom out.
procedure Draw_Line
       (Plot               : access Gtk_Plot_Record;
        Line               :        Gtk_Plot_Line;
        X1, Y1, X2, Y2     :        Gdouble);

Draw a line on the plot
Coordinates and sizes
---------------------

procedure Get_Position
       (Plot               : access Gtk_Plot_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the position of the Plot within its drawable.
X and Y are in the range 0.0 .. 1.0, where (0.0, 0.0) is the top-left
corner and (1.0, 1.0) the bottom-right corner. The position can be
modified by Move below.
procedure Get_Size
       (Plot               : access Gtk_Plot_Record;
        Width              : out    Gdouble;
        Height             : out    Gdouble);

Return the size of the Plot.
Width and Height are both in the range 0.0 .. 1.0, where 1.0 means they
occupy all the space available in the Drawable, 0.5 means they only
occupy half of it.
function Get_Internal_Allocation
       (Plot               : access Gtk_Plot_Record)
        return Gtk.Widget.Gtk_Allocation;

Return the real position/size of the plot inside its parent container.
You should use this function instead of converting yourself the result
of Get_Position and Get_Size.
procedure Move
       (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Move the plot widget inside its drawable.
X and Y should both be in the range 0.0 .. 1.0 (from top-left corner
to bottom-right corner).
procedure Resize
       (Plot               : access Gtk_Plot_Record;
        Width              : in     Gdouble;
        Height             : in     Gdouble);

Resize the widget.
Width and Height should both be in the range 0.0 .. 1.0, this indicates
which ratio of the drawable's screen real-estate they should use.
procedure Move_Resize
       (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Width              : in     Gdouble;
        Height             : in     Gdouble);

Move and resize the widget in a single operation.
This is faster than doing each operation separately.
procedure Get_Pixel
       (Plot               : access Gtk_Plot_Record;
        Xx                 : in     Gdouble;
        Yy                 : in     Gdouble;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Get the screen coordinate (relative to Plot's parent) of a point.
The initial coordinates (Xx, Yy) should be in the range 0.0 .. 1.0.
procedure Clip_Data
       (Plot               : access Gtk_Plot_Record;
        Clip               :        Boolean);

If Clip is True, any drawing of a Gtk_Plot_Data will be limited to the
area occupied by Plot. Otherwise, it might draw outside of Plot.
procedure Get_Point
       (Plot               : access Gtk_Plot_Record;
        X                  : in     Gint;
        Y                  : in     Gint;
        Xx                 : out    Gdouble;
        Yy                 : out    Gdouble);

Convert from an absolute screen coordinate to a relative one.
(X, Y) should be relative to Plot's parent.   This function is the
opposite of Get_Pixel.
procedure Set_Xrange
       (Plot               : access Gtk_Plot_Record;
        Xmin               : in     Gdouble := 0.0;
        Xmax               : in     Gdouble := 1.0);

Set the range of visible points for this plot.
Only the points of the graph those coordinates are in the range  Xmin
.. Xmax will be visible.
procedure Set_Yrange
       (Plot               : access Gtk_Plot_Record;
        Ymin               : in     Gdouble := 0.0;
        Ymax               : in     Gdouble := 1.0);

Set the range of visible points for this plot.
Only the points of the graph those coordinates are in the range  Xmin
.. Xmax will be visible.
procedure Set_Range
       (Plot               : access Gtk_Plot_Record;
        Xmin               : in     Gdouble := 0.0;
        Xmax               : in     Gdouble := 1.0;
        Ymin               : in     Gdouble := 0.0;
        Ymax               : in     Gdouble := 1.0);

Set both ranges at the same time
procedure Autoscale
       (Plot               : access Gtk_Plot_Record);

Calculate automically the appropriate ranges for the plot.
procedure Get_Xrange
       (Plot               : access Gtk_Plot_Record;
        Xmin               : out    Gdouble;
        Xmax               : out    Gdouble);

Get the current range for the X axis.
procedure Get_Yrange
       (Plot               : access Gtk_Plot_Record;
        Ymin               : out    Gdouble;
        Ymax               : out    Gdouble);

Get the current range for the X axis.
procedure Set_Xscale
       (Plot               : access Gtk_Plot_Record;
        Scale_Type         : in     Plot_Scale);

Set the type of the X axis (logarithmic, linear, ...).
procedure Set_Yscale
       (Plot               : access Gtk_Plot_Record;
        Scale_Type         : in     Plot_Scale);

Set the type of the Y axis (logarithmic, linear, ...).
function Get_Xscale
       (Plot               : access Gtk_Plot_Record)
        return Plot_Scale;

Get the type of the X axis.
function Get_Yscale
       (Plot               : access Gtk_Plot_Record)
        return Plot_Scale;

Get the type of the Y axis.
procedure Reflect_X
       (Plot               : access Gtk_Plot_Record;
        Reflect            :        Boolean);

Reverse the direction of the X axis
function Is_X_Reflected
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Whether the X axis is currently reflected
procedure Reflect_Y
       (Plot               : access Gtk_Plot_Record;
        Reflect            :        Boolean);

Reverse the direction of the Y axis
function Is_Y_Reflected
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Whether the Y axis is currently reflected
Axis
----

A Gtk_Plot has four axis, one one each of its sides. These axis can
have ticks, labels for ticks, titles, ... associated with them.

procedure Gtk_New
       (Axis               : out    Gtk_Plot_Axis;
        Orientation        :        Plot_Orientation);

Create a new axis
function Axis_Get_Type         return Gtk_Type;


Return the internal value associated with a Gtk_Plot_Axis.
function Get_Axis
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos)
        return Gtk_Plot_Axis;

Get a pointer to an axis.
procedure Axis_Set_Visible
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Visible            : in     Boolean);

Indicate whether the axis should be visible or not.
function Axis_Visible
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos)
        return Boolean;

Return the visibility state of the axis
procedure Axis_Set_Title
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Title              : in     String);

Modify the title of the axis.
Each axis has a title that is displayed along its line (vertically  for
the left and right sides).
procedure Axis_Show_Title
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos);

Show the title associated with the axis.
procedure Axis_Hide_Title
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos);

Hide the title associated with the axis.
procedure Axis_Move_Title
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Angle              : in     Plot_Angle;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Modify the position and orientation of the axis' title.
X and Y indicate a position relative to the location of the axis (0.0
to display it to the left (resp. top) of the axis, 1.0 to display it
to the right (resp. bottom) of the axis.
procedure Axis_Justify_Title
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Modify the justification for the axis.
procedure Axis_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Line_Width         : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Modify the attributes of the lines of the axis.
procedure Axis_Get_Attributes
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Line_Width         : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the axis.
procedure Axis_Set_Ticks
       (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Major_Step         : in     Gdouble;
        Num_Minor          : in     Gint);

Set up ticks for a specific orientation.
A horizontal orientation will match the left and right sides, whereas
a vertical orientation will match the top and bottom sides.
Major_Step is a percentage value of the widget size, and indicate the
step between each big ticks. For instance, if Major_Step has a value
of 0.2, there will be 5 big ticks drawn along the axis.   Num_Minor is
the number of minor ticks between each major one.
procedure Axis_Set_Major_Ticks
       (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Major_Step         : in     Gdouble);

Modify the step for major ticks.
This is a percentage value that indicates how many major ticks are
drawn along the axis. See also Axis_Set_Ticks.
procedure Axis_Set_Minor_Ticks
       (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Num_Minor          : in     Gint);

Modify the number of minor ticks between each major one.
See also Axis_Set_Ticks.
procedure Axis_Set_Ticks_Length
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Length             : in     Gint);

Set the length (in pixels) of the big ticks.
The small ticks will have half this length.
procedure Axis_Set_Ticks_Width
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Width              : in     Gfloat);

Set the width (in pixels) of the ticks.
This width is common to both the long and short ticks.
procedure Axis_Show_Ticks
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Major_Mask         : in     Plot_Ticks_Pos;
        Minor_Mask         : in     Plot_Ticks_Pos);

Set the style of the ticks.
procedure Axis_Set_Ticks_Limits
       (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation;
        Ticks_Beg          : in     Gdouble;
        Ticks_End          : in     Gdouble);

Indicate the area of the axis that should have ticks.
Ticks will be displayed only from Ticks_Beg to Ticks_End.
procedure Axis_Unset_Ticks_Limits
       (Plot               : access Gtk_Plot_Record;
        Orientation        : in     Plot_Orientation);

Cancel the ticks limits set by a previous call to
Axis_Set_Ticks_Limits.
procedure Axis_Set_Break
       (Plot               : access Gtk_Plot_Record;
        Orient             :        Plot_Orientation;
        Min, Max           :        Gdouble;
        Step_After         :        Gdouble;
        Nminor_After       :        Gint;
        Scale_After        :        Plot_Scale);

???
procedure Axis_Remove_Break
       (Plot               : access Gtk_Plot_Record;
        Orient             :        Plot_Orientation);

???
procedure Axis_Show_Labels
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Labels_Mask        : in     Plot_Label_Pos);

Indicate whether a label should be drawn at each ticks to indicate
its value.   Not all values of Labels_Mask are relevant for all axis.
For instance,  for a vertical axis, the relevant values are Axis_Right
and Axis_Left.
procedure Axis_Title_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Font               : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the attributes to be used for the title of the axis.
Font is a postscript font name (as listed in the beginning of this
package).
procedure Axis_Set_Labels_Attributes
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Font               : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean;
        Justification      : in     Gtk.Enums.Gtk_Justification);

Set the attributes to be used for the ticks labels.
procedure Axis_Use_Custom_Tick_Labels
       (Plot               : access Gtk_Plot_Record;
        Axis               : in     Plot_Axis_Pos;
        Custom             : in     Boolean := True);

Indicate which kind of labels should be used for major ticks.
If Custom is True, then the labels set by Axis_Set_Tick_Labels will  be
used.
procedure Axis_Set_Labels_Offset
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Offset             :        Gint);

Set the distance between the axis and its labels
function Axis_Get_Labels_Offset
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos)
        return Gint;

Get the distance between the axis and its labels.
procedure Axis_Set_Labels_Style
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Style              :        Plot_Label_Style;
        Precision          :        Gint);

Set the style of labels.
This indicates whether the labels should be displayed as floating
point values or in the scientific notation.   Precision is the number
of digits to be printed.
procedure Axis_Set_Labels_Suffix
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Text               :        String);

Defines a suffix to add after each label on the axis
procedure Axis_Set_Labels_Prefix
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos;
        Text               :        String);

Defines a prefix to add before each label on the axis
function Axis_Get_Labels_Suffix
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos)
        return String;

Return the suffix added to each label.
function Axis_Get_Labels_Prefix
       (Plot               : access Gtk_Plot_Record;
        Axis               :        Plot_Axis_Pos)
        return String;

Return the prefix added to each label.
Grids
-----

A grid can be displayed in the graph.
This makes it easier to understand a graphics in some situations.   The
grid has two simultaneous line styles, each with its own specific  step
(minor and major steps).

   There are two special lines in the grid, that you can display even if
you don't display the rest of the line. These are the origin of the
coordinates system, ie the lines at X=0 and Y=0.

procedure X0_Set_Visible
       (Plot               : access Gtk_Plot_Record;
        Visible            : in     Boolean);

Indicate whether the line at X=0 should be displayed.
function X0_Visible
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Return the visibility state of the line at X=0
procedure Y0_Set_Visible
       (Plot               : access Gtk_Plot_Record;
        Visible            : in     Boolean);

Indicate whether the line at Y=0 should be displayed.
function Y0_Visible
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Return the visibility state of the line at Y=0
procedure X0line_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the line at X=0
procedure Y0line_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes of the line at Y=0
procedure Grids_Set_On_Top
       (Plot               : access Gtk_Plot_Record;
        On_Top             :        Boolean);

Whether the grid should be displayed on top of the plots
function Grids_On_Top
       (Plot               : access Gtk_Plot_Record)
        return Boolean;

Whether the gris is currently displayed on top of the plots
procedure Grids_Set_Visible
       (Plot               : access Gtk_Plot_Record;
        Vmajor             : in     Boolean;
        Vminor             : in     Boolean;
        Hmajor             : in     Boolean;
        Hminor             : in     Boolean);

Indicate whether the lines of the grids should be displayed.
You can decide separately whether the major and minor lines should  be
displayed.
procedure Grids_Visible
       (Plot               : access Gtk_Plot_Record;
        Vmajor             : out    Boolean;
        Vminor             : out    Boolean;
        Hmajor             : out    Boolean;
        Hminor             : out    Boolean);

Return the visibility state of the grid.
procedure Major_Hgrid_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the major horizontal lines in the grid.
procedure Major_Vgrid_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the major vertical lines in the grid.
procedure Minor_Hgrid_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the minor horizontal lines in the grid.
procedure Minor_Vgrid_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Style              : in     Plot_Line_Style;
        Width              : in     Gfloat;
        Color              : in     Gdk.Color.Gdk_Color);

Set the attributes for the minor vertical lines in the grid.
Legends
-------

Each graph is associated with one legend, that is supposed to
indicate what the plot represents.

procedure Show_Legends
       (Plot               : access Gtk_Plot_Record);

Indicate that the legend should be displayed.
procedure Hide_Legends
       (Plot               : access Gtk_Plot_Record);

Indicate that the legend should not be displayed.
procedure Set_Legends_Border
       (Plot               : access Gtk_Plot_Record;
        Border             :        Plot_Border_Style;
        Shadow_Width       :        Gint);

Modify the way the borders of the legend look like.
procedure Legends_Move
       (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble);

Move the legend relative to the widget's area.
X and Y are percentage values. (0.0, 0.0) indicates the top-left
corner of the plot, (1.0, 1.0) indicates the bottom-right corner.
procedure Legends_Get_Position
       (Plot               : access Gtk_Plot_Record;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the current position of the legend.
function Legends_Get_Allocation
       (Plot               : access Gtk_Plot_Record)
        return Gtk.Widget.Gtk_Allocation;

Return the exact coordinates and size in pixels of the legend.
The coordinates are relative to the widget's parent container.
procedure Legends_Set_Attributes
       (Plot               : access Gtk_Plot_Record;
        Ps_Font            : in     String;
        Height             : in     Gint;
        Foreground         : in     Gdk.Color.Gdk_Color;
        Background         : in     Gdk.Color.Gdk_Color);

Set the attributes to use when displaying the legend.
Line
----

procedure Set_Line_Style
       (Line               :        Gtk_Plot_Line;
        Style              :        Plot_Line_Style);

Change the style of the line.
procedure Set_Line_Width
       (Line               :        Gtk_Plot_Line;
        Width              :        Gfloat);

Change the width of the line.
procedure Set_Color
       (Line               :        Gtk_Plot_Line;
        Color              :        Gdk.Color.Gdk_Color);

Change the color used to draw the line
Text
----

procedure Put_Text
       (Plot               : access Gtk_Plot_Record;
        X                  : in     Gdouble;
        Y                  : in     Gdouble;
        Font               : in     String := "";
        Font_Height        : in     Gint := 10;
        Angle              : in     Plot_Angle;
        Foreground         : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Background         : in     Gdk.Color.Gdk_Color
                            := Gdk.Color.Null_Color;
        Transparent        : in     Boolean := False;
        Justification      : in     Gtk.Enums.Gtk_Justification
                            := Gtk.Enums.Justify_Center;
        Text               : in     String := "");

Print some text in Plot.
The text will be drawn at the relative coordinates (X, Y), with a
specified Angle.   If Font is the empty string, a default font and
default Font_Height  will be used. Likewise, default colors will be
used if you don't  specify any. Font should be the name of a postscript
font, the list of  which can be found in Gtk.Plot.Psfont.   If
Transparent is True, then no background will be drawn for the text.
procedure Remove_Text
       (Plot               : access Gtk_Plot_Record;
        Text               : in     Gtk_Plot_Text);

Remove some text that is currently visible on the plot.
Nothing is done if Text is currently not visible.
procedure Text_Get_Area
       (Text               : in     Gtk_Plot_Text;
        Angle              : in     Gint;
        Just               : in     Gtk.Enums.Gtk_Justification;
        Font_Name          : in     String;
        Font_Size          : in     Gint;
        X                  : out    Gint;
        Y                  : out    Gint;
        Width              : out    Gint;
        Height             : out    Gint);

Return the area currently occupied by a text.
The coordinates are relative to the top-left corner of the plot in
which the text was put.
procedure Text_Get_Size
       (Text               : in     Gtk_Plot_Text;
        Angle              : in     Gint;
        Font_Name          : in     String;
        Font_Size          : in     Gint;
        Width              : out    Gint;
        Height             : out    Gint;
        Ascent             : out    Gint;
        Descent            : out    Gint);

Return the size in pixels occupied by a text in the plot.
*note Package_Gtk.Extra.Plot_Canvas:: for a function that returns  a
Gtk_Plot_Text.
function Get_Texts
       (Plot               : access Gtk_Plot_Record)
        return Texts_List.Glist;

Return the list of all the texts associated with the plot
procedure Get_Text_Position
       (Text               : in     Gtk_Plot_Text;
        X                  : out    Gdouble;
        Y                  : out    Gdouble);

Return the location of the Text.
function Get_Text_String
       (Text               : in     Gtk_Plot_Text)
        return String;

Return the string of the text.
procedure Text_Set_Attributes
       (Text               : in     Gtk_Plot_Text;
        Font               : in     String;
        Height             : in     Gint;
        Angle              : in     Plot_Angle;
        Fg                 : in     Gdk.Color.Gdk_Color;
        Bg                 : in     Gdk.Color.Gdk_Color;
        Transparent        : in     Boolean := False;
        Justification      : in     Gtk.Enums.Gtk_Justification
                            := Gtk.Enums.Justify_Center;
        Str                : in     String := "");

Change the attributes of Text.
procedure Draw_Text
       (Plot               : access Gtk_Plot_Record;
        Text               :        Gtk_Plot_Text);

Draw the text
procedure Text_Set_Border
       (Text               :        Gtk_Plot_Text;
        Border             :        Plot_Border_Style;
        Border_Space       :        Gint;
        Border_Width       :        Gint;
        Shadow_Width       :        Gint);

Set the border attributes for the text
Datasets
--------

A dataset is a set of points, either given explicitly by your
application or calculated with a specific function, and that can be
plotted on the screen.   In Gtk_Plot, such a set is represented with
symbols (special points in  the graph, that can be manipulated
interactively if you so wish), linked  by connectors, which are either
straight lines, splines, sets, ...   Multiple data sets can of course
be printed on a single graph.

procedure Add_Data
       (Plot               : access Gtk_Plot_Record;
        Data               : access Gtk_Plot_Data_Record'Class);

Add an existing set of data to the plot.
This set will automatically be drawn the next time the Plot itself is
drawn.
function Remove_Data
       (Plot               : access Gtk_Plot_Record;
        Data               : access Gtk_Plot_Data_Record'Class)
        return Boolean;

Remove the dataset from Plot.
This function returns True if the dataset was indeed found and could be
removed, False otherwise.
function Add_Function
       (Plot               : access Gtk_Plot_Record;
        Func               : in     Plot_Function)
        return Gtk_Plot_Data;

Allocate a new dataset, whose point are automatically calculated.
Func is a function that takes the X coordinate value, and should return
the Y coordinate value.   The newly allocated set should be freed by
calling Free above.   The set is automatically added to the plot, so
you don't need to  explicitly call Add_Dataset.

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_3D,  Next: Package_Gtk.Extra.Plot_Bar,  Prev: Package_Gtk.Extra.Plot,  Up: Top

Package Gtk.Extra.Plot`_'3D
***************************

A special plot that draws its data in three dimension. The data
associated  with such plots should either be a function or a
Gtk.Extra.Plot_Surface.

* Menu:

* Gtk.Extra.Plot_3D Widget Hierarchy::
* Gtk.Extra.Plot_3D Types::
* Gtk.Extra.Plot_3D Subprograms::


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_3D Widget Hierarchy,  Next: Gtk.Extra.Plot_3D Types,  Up: Package_Gtk.Extra.Plot_3D

Widget Hierarchy
================

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot           (*note Package_Gtk.Extra.Plot::)
              \___ Gtk_Plot_3D     (*note Package_Gtk.Extra.Plot_3D::)


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_3D Types,  Next: Gtk.Extra.Plot_3D Subprograms,  Prev: Gtk.Extra.Plot_3D Widget Hierarchy,  Up: Package_Gtk.Extra.Plot_3D

Types
=====

type Plot_Plane is new Integer;


type Plot_Side is mod 2 ** 32;


type Plot_Vector is record
         X, Y, Z : Gdouble;
         end record;


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_3D Subprograms,  Prev: Gtk.Extra.Plot_3D Types,  Up: Package_Gtk.Extra.Plot_3D

Subprograms
===========

procedure Gtk_New
       (Widget             : out    Gtk_Plot_3D;
        Drawable           :        Gdk.Drawable.Gdk_Drawable;
        Width, Height      :        Gdouble := 0.0);

Create a new 3D plot.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with this widget.
procedure Autoscale
       (Plot               : access Gtk_Plot_3D_Record);

Chooses the best ranges for all coordinates depending on the data sets
put in Plot. Note that only data sets whose points you have set
explicitely are taken into account, not the ones based on functions.
function Get_Xfactor
       (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

function Get_Zfactor
       (Plot               : access Gtk_Plot_3D_Record)
        return Gdouble;

Get the scaling factor along each of the coordinates.
procedure Set_Xfactor
       (Plot               : access Gtk_Plot_3D_Record;
        Xfactor            :        Gdouble);

procedure Set_Zfactor
       (Plot               : access Gtk_Plot_3D_Record;
        Zfactor            :        Gdouble);

Set the scaling factor along each of the coordinates
procedure Set_Xrange
       (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

procedure Set_Zrange
       (Plot               : access Gtk_Plot_3D_Record;
        Min, Max           :        Gdouble);

Set the minimal and maximal values for each axis.
Axis
----

procedure Axis_Hide_Title
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Hide the title associated with the axis.
procedure Axis_Set_Major_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble);

Modify the step for major ticks.
This is a percentage value that indicates how many major ticks are
drawn along the axis. See also Axis_Set_Ticks.
procedure Axis_Set_Minor_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Nminor             :        Gint);

Modify the number of minor ticks between each major one.
See also Axis_Set_Ticks.
procedure Axis_Set_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Major_Step         :        Gdouble;
        Nminor             :        Gint);

Set up ticks for a specific orientation.
A horizontal orientation will match the left and right sides, whereas
a vertical orientation will match the top and bottom sides.
Major_Step is a percentage value of the widget size, and indicate the
step between each big ticks. For instance, if Major_Step has a value
of 0.2, there will be 5 big ticks drawn along the axis.   Num_Minor is
the number of minor ticks between each major one.
procedure Axis_Set_Ticks_Length
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Length             :        Gint);

Set the length (in pixels) of the big ticks.
The small ticks will have half this length.
procedure Axis_Set_Ticks_Width
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Width              :        Gfloat);

Set the width (in pixels) of the ticks.
This width is common to both the long and short ticks.
procedure Axis_Show_Labels
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Label_Mask         :        Gint);

Indicate whether a label should be drawn at each ticks to indicate
its value.   Not all values of Labels_Mask are relevant for all axis.
For instance,  for a vertical axis, the relevant values are Label_Right
and Label_Left.
procedure Axis_Show_Major_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the major ticks along one of the axis
procedure Axis_Show_Minor_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Ticks_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the minor ticks along one of the axis
procedure Axis_Show_Ticks
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side;
        Major_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos;
        Minor_Mask         :        Gtk.Extra.Plot.Plot_Ticks_Pos);

Set the style of the ticks.
procedure Axis_Show_Title
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side);

Show the title associated with the axis.
function Get_Axis
       (Plot               : access Gtk_Plot_3D_Record;
        Orientation        :        Gtk.Extra.Plot.Plot_Orientation)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Return a handle to a specific axis.
function Get_Side
       (Plot               : access Gtk_Plot_3D_Record;
        Side               :        Plot_Side)
        return Gtk.Extra.Plot.Gtk_Plot_Axis;

Get the axis for a specific side.
procedure Axis_Set_Scale
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation;
        Scale              :        Gtk.Extra.Plot.Plot_Scale);

Set the scale for the axis
function Axis_Get_Scale
       (Plot               : access Gtk_Plot_3D_Record;
        Axis               :        Gtk.Extra.Plot.Plot_Orientation)
        return Gtk.Extra.Plot.Plot_Scale;

Get the current sale for the axis
Grid
----

procedure Major_Grids_Set_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Major_Grids_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Minor_Grids_Set_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Boolean);

Indicate whether the grid should be displayed for each coordinate
procedure Minor_Grids_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            : out    Boolean);

Indicate whether the grid is currently displayed.
procedure Major_Zgrid_Get_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the major grid
procedure Major_Zgrid_Set_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the major grid
procedure Minor_Zgrid_Get_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the attributes of the minor grid
procedure Minor_Zgrid_Set_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Set the attributes of the minor grid
Rotating
--------

procedure Reset_Angles
       (Plot               : access Gtk_Plot_3D_Record);

reset all the angles to their default values
procedure Rotate
       (Plot               : access Gtk_Plot_3D_Record;
        Angle_X, Angle_Y, Angle_Z  :        Gdouble);

Rotate the plot along the three axis at the same time.
The angles are specified in degrees.
procedure Rotate_Vector
       (Plot               : access Gtk_Plot_3D_Record;
        Vector             :        Plot_Vector;
        A1, A2, A3         :        Gdouble);

Rotate Vector along the three axis.
The three angles A1, A2 and A3 are specified in degrees.
procedure Rotate_X
       (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

procedure Rotate_Z
       (Plot               : access Gtk_Plot_3D_Record;
        Angle              :        Gdouble);

Rotate the plot along a specific axis.
Angle is specific in degrees.
Planes
------

A 3D plot is associated, as usual, with three axis (one per coordinate
X, Y and Z). These three axis, together, define 3 planes that can be
shown or hidden, and on which a grid can be displayed to make it easy
to visualize the value of the data.

procedure Plane_Set_Color
       (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Color              :        Gdk.Color.Gdk_Color);

Define the background color to use for one of the planes. Each plane
can have its own color.
procedure Plane_Set_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane;
        Visible            :        Boolean);

Indicate whether each plane should be displayed or not.
function Plane_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        Plane              :        Plot_Plane)
        return Boolean;

Indicate whether a plane is currently visible or not.
Corners
-------

In addition to drawing the three planes defined by the axis, a 3D plot
can also draw some lines to draw a cube around the plot (although the
three new planes defined by these lines are left transparent so that
the plot is visible.

procedure Corner_Get_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

Get the style of the corner lines.
procedure Corner_Set_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

Define the style of the corner lines.
procedure Corner_Set_Visible
       (Plot               : access Gtk_Plot_3D_Record;
        Visible            :        Boolean);

Whether corners should be visible
function Corner_Visible
       (Plot               : access Gtk_Plot_3D_Record)
        return Boolean;

Indicate whether corners are visible
Misc
----

procedure Frame_Get_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              : out    Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              : out    Gfloat;
        Color              : out    Gdk.Color.Gdk_Color);

procedure Frame_Set_Attributes
       (Plot               : access Gtk_Plot_3D_Record;
        Style              :        Gtk.Extra.Plot_Data.Plot_Line_Style;
        Width              :        Gfloat;
        Color              :        Gdk.Color.Gdk_Color);

procedure Get_Pixel
       (Plot               : access Gtk_Plot_3D_Record;
        X, Y, Z            :        Gdouble;
        Px, Py, Pz         : out    Gdouble);

function Get_Titles_Offset
       (Plot               : access Gtk_Plot_3D_Record)
        return Gint;

procedure Set_Titles_Offset
       (Plot               : access Gtk_Plot_3D_Record;
        Offset             :        Gint);


File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Bar,  Next: Package_Gtk.Extra.Plot_Box,  Prev: Package_Gtk.Extra.Plot_3D,  Up: Top

Package Gtk.Extra.Plot`_'Bar
****************************

This special type of data set displays itself with bar (also known  as
histograms).

* Menu:

* Gtk.Extra.Plot_Bar Widget Hierarchy::
* Gtk.Extra.Plot_Bar Subprograms::


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_Bar Widget Hierarchy,  Next: Gtk.Extra.Plot_Bar Subprograms,  Up: Package_Gtk.Extra.Plot_Bar

Widget Hierarchy
================

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Bar    (*note Package_Gtk.Extra.Plot_Bar::)


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_Bar Subprograms,  Prev: Gtk.Extra.Plot_Bar Widget Hierarchy,  Up: Package_Gtk.Extra.Plot_Bar

Subprograms
===========

procedure Gtk_New
       (Bar                : out    Gtk_Plot_Bar;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Bar.
procedure Set_Width
       (Bar                : access Gtk_Plot_Bar_Record'Class;
        Width              :        Gdouble);

Set the width of the bars
function Get_Width
       (Bar                : access Gtk_Plot_Bar_Record'Class)
        return Gdouble;

Return the width used to draw the bars

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Box,  Next: Package_Gtk.Extra.Plot_Canvas,  Prev: Package_Gtk.Extra.Plot_Bar,  Up: Top

Package Gtk.Extra.Plot`_'Box
****************************

This special type of data set displays itself with boxes

* Menu:

* Gtk.Extra.Plot_Box Widget Hierarchy::
* Gtk.Extra.Plot_Box Subprograms::


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_Box Widget Hierarchy,  Next: Gtk.Extra.Plot_Box Subprograms,  Up: Package_Gtk.Extra.Plot_Box

Widget Hierarchy
================

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Plot_Data      (*note Package_Gtk.Extra.Plot_Data::)
              \___ Gtk_Plot_Box    (*note Package_Gtk.Extra.Plot_Box::)


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_Box Subprograms,  Prev: Gtk.Extra.Plot_Box Widget Hierarchy,  Up: Package_Gtk.Extra.Plot_Box

Subprograms
===========

procedure Gtk_New
       (Box                : out    Gtk_Plot_Box;
        Orientation        :        Gtk.Enums.Gtk_Orientation);

Create a new Plot bar.
function Get_Type              return Gtk.Gtk_Type;


Return the internal value associated with a Gtk_Box

File: gtkada_rm.info,  Node: Package_Gtk.Extra.Plot_Canvas,  Next: Package_Gtk.Extra.Plot_Data,  Prev: Package_Gtk.Extra.Plot_Box,  Up: Top

Package Gtk.Extra.Plot`_'Canvas
*******************************

A Gtk_Plot_Canvas is a special kind of drawing area used with Gtk_Plot
widgets.   It provides drag-and-drop capabilities for the texts,
legends, points...   available in a Gtk_Plot.   Note that this widget
is specifically designed for Gtk_Plot widgets, and  won't provide any
other capability for other kinds of widgets.

   Like any child of Gtk_Layout, this widget can have an almost
unlimited  size for its children, and provides scrolling.

* Menu:

* Gtk.Extra.Plot_Canvas Widget Hierarchy::
* Gtk.Extra.Plot_Canvas Signals::
* Gtk.Extra.Plot_Canvas Types::
* Gtk.Extra.Plot_Canvas Subprograms::


File: gtkada_rm.info,  Node: Gtk.Extra.Plot_Canvas Widget Hierarchy,  Next: Gtk.Extra.Plot_Canvas Signals,  Up: Package_Gtk.Extra.Plot_Canvas

Widget Hierarchy
================

     GObject                       (*note Package_Glib.Object::)
     Gtk_Object                    (*note Package_Gtk.Object::)
        \___ Gtk_Widget            (*note Package_Gtk.Widget::)
           \___ Gtk_Container      (*note Package_Gtk.Container::)
              \___ Gtk_Fixed       (*note Package_Gtk.Fixed::)
                 \___ Gtk_Plot_Canvas (*note Package_Gtk.Extra.Plot_Canvas::)

