Creating a plot
-
procedure Gtk_New
(Plot : out Gtk_Plot;
Drawable : Gdk.Drawable.Gdk_Drawable := Gdk.Drawable.Null_Drawable);
-
procedure Gtk_New
(Plot : out Gtk_Plot;
Width : Gdouble;
Height : Gdouble;
Drawable : Gdk.Drawable.Gdk_Drawable := Gdk.Drawable.Null_Drawable);
-
-
procedure Initialize
(Plot :
access Gtk_Plot_Record'Class;
Drawable :
Gdk.Drawable.Gdk_Drawable;
Width : Gdouble;
Height : Gdouble);
-
-
-
-
-
-
procedure Set_Transparent
(Plot : access Gtk_Plot_Record; Transparent : Boolean);
-
function Is_Transparent (Plot : access Gtk_Plot_Record) return Boolean;
-
procedure Paint (Plot : access Gtk_Plot_Record);
-
procedure Refresh
(Plot : access Gtk_Plot_Record;
Area : Gdk.Rectangle.Gdk_Rectangle);
Coordinates and sizes
-
procedure Get_Position
(Plot : access Gtk_Plot_Record;
X : out Gdouble;
Y : out Gdouble);
-
procedure Get_Size
(Plot : access Gtk_Plot_Record;
Width : out Gdouble;
Height : out Gdouble);
-
-
procedure Set_Magnification
(Plot : access Gtk_Plot_Record;
Magnification : Gdouble);
-
procedure Move
(Plot : access Gtk_Plot_Record;
X : Gdouble;
Y : Gdouble);
-
procedure Resize
(Plot : access Gtk_Plot_Record;
Width : Gdouble;
Height : Gdouble);
-
procedure Move_Resize
(Plot : access Gtk_Plot_Record;
X : Gdouble;
Y : Gdouble;
Width : Gdouble;
Height : Gdouble);
-
procedure Get_Pixel
(Plot : access Gtk_Plot_Record;
Xx : Gdouble;
Yy : Gdouble;
X : out Gdouble;
Y : out Gdouble);
-
procedure Clip_Data (Plot : access Gtk_Plot_Record; Clip : Boolean);
-
procedure Get_Point
(Plot : access Gtk_Plot_Record;
X : Gint;
Y : Gint;
Xx : out Gdouble;
Yy : out Gdouble);
-
procedure Set_Xrange
(Plot : access Gtk_Plot_Record;
Xmin : Gdouble := 0.0;
Xmax : Gdouble := 1.0);
-
procedure Set_Yrange
(Plot : access Gtk_Plot_Record;
Ymin : Gdouble := 0.0;
Ymax : Gdouble := 1.0);
-
procedure Set_Range
(Plot : access Gtk_Plot_Record;
Xmin : Gdouble := 0.0;
Xmax : Gdouble := 1.0;
Ymin : Gdouble := 0.0;
Ymax : Gdouble := 1.0);
-
procedure Autoscale (Plot : access Gtk_Plot_Record);
-
procedure Get_Xrange
(Plot : access Gtk_Plot_Record;
Xmin : out Gdouble;
Xmax : out Gdouble);
-
procedure Get_Yrange
(Plot : access Gtk_Plot_Record;
Ymin : out Gdouble;
Ymax : out Gdouble);
-
procedure Set_Xscale
(Plot : access Gtk_Plot_Record;
Scale_Type : Plot_Scale);
-
procedure Set_Yscale
(Plot : access Gtk_Plot_Record;
Scale_Type : Plot_Scale);
-
function Get_Xscale
(Plot : access Gtk_Plot_Record) return Plot_Scale;
-
function Get_Yscale
(Plot : access Gtk_Plot_Record) return Plot_Scale;
-
procedure Reflect_X (Plot : access Gtk_Plot_Record; Reflect : Boolean);
-
function Is_X_Reflected (Plot : access Gtk_Plot_Record) return Boolean;
-
procedure Reflect_Y (Plot : access Gtk_Plot_Record; Reflect : Boolean);
-
function Is_Y_Reflected (Plot : access Gtk_Plot_Record) return Boolean;
Text
-
function Put_Text
(Plot : access Gtk_Plot_Record;
X : Gdouble;
Y : Gdouble;
Font : String := "";
Font_Height : Gint := 10;
Angle : Plot_Angle;
Foreground : Gdk.Color.Gdk_Color := Gdk.Color.Null_Color;
Background : Gdk.Color.Gdk_Color := Gdk.Color.Null_Color;
Transparent : Boolean := False;
Justification : Gtk.Enums.Gtk_Justification := Gtk.Enums.Justify_Center;
Text : String := "") return Gtk_Plot_Text;
-
procedure Remove_Text
(Plot : access Gtk_Plot_Record;
Text : Gtk_Plot_Text);
-
procedure Text_Get_Area
(Text : Gtk_Plot_Text;
Angle : Plot_Angle;
Just :
Gtk.Enums.Gtk_Justification;
Font_Name : String;
Font_Size : Gint;
X :
out Gint;
Y :
out Gint;
Width :
out Gint;
Height :
out Gint);
-
procedure Text_Get_Size
(Text : Gtk_Plot_Text;
Angle : Plot_Angle;
Font_Name : String;
Font_Size : Gint;
Width : out Gint;
Height : out Gint;
Ascent : out Gint;
Descent : out Gint);
-
procedure Text_Set_Attributes
(Text : Gtk_Plot_Text;
Font : String;
Height : Gint;
Angle : Plot_Angle;
Fg :
Gdk.Color.Gdk_Color;
Bg :
Gdk.Color.Gdk_Color;
Transparent : Boolean := False;
Justification : Gtk.Enums.Gtk_Justification := Gtk.Enums.Justify_Center;
Str : String := "");
-
procedure Text_Set_Border
(Text : Gtk_Plot_Text;
Border : Plot_Border_Style;
Border_Space : Gint;
Border_Width : Gint;
Shadow_Width : Gint);
-
procedure Draw_Text
(Plot : access Gtk_Plot_Record;
Text : Gtk_Plot_Text);
Lines
-
procedure Draw_Line
(Plot : access Gtk_Plot_Record;
Line : Gtk_Plot_Line;
X1, Y1, X2, Y2 : Gdouble);
-
procedure Set_Line_Attributes
(Plot : access Gtk_Plot_Record;
Line : Gtk_Plot_Line);
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 Set_Ticks
(Plot : access Gtk_Plot_Record;
Orientation : Plot_Orientation;
Major_Step : Gdouble;
Num_Minor : Gint);
-
procedure Set_Major_Ticks
(Plot : access Gtk_Plot_Record;
Orientation : Plot_Orientation;
Major_Step : Gdouble);
-
procedure Set_Minor_Ticks
(Plot : access Gtk_Plot_Record;
Orientation : Plot_Orientation;
Num_Minor : Gint);
-
procedure Set_Ticks_Limits
(Plot : access Gtk_Plot_Record;
Orientation : Plot_Orientation;
Ticks_Begin : Gdouble;
Ticks_End : Gdouble);
-
procedure Unset_Ticks_Limits
(Plot : access Gtk_Plot_Record;
Orientation : Plot_Orientation);
-
procedure Set_Break
(Plot : access Gtk_Plot_Record;
Orient : Plot_Orientation;
Min, Max : Gdouble;
Step_After : Gdouble;
Nminor_After : Gint;
Scale_After : Plot_Scale;
Pos : Gdouble);
-
procedure Remove_Break
(Plot : access Gtk_Plot_Record; Orient : Plot_Orientation);
-
procedure Gtk_New
(Axis : out Gtk_Plot_Axis;
Orientation : Plot_Orientation);
-
procedure Initialize
(Axis : access Gtk_Plot_Axis_Record'Class;
Orientation : Plot_Orientation);
-
function Axis_Get_Type return Gtk_Type;
-
function Get_Axis
(Plot : access Gtk_Plot_Record;
Axis : Plot_Axis_Pos) return Gtk_Plot_Axis;
-
function Gradient
(Data : access Gtk_Plot_Data_Record'Class) return Gtk_Plot_Axis;
-
procedure Axis_Set_Visible
(Axis : access Gtk_Plot_Axis_Record;
Visible : Boolean);
-
function Axis_Visible
(Axis : access Gtk_Plot_Axis_Record) return Boolean;
-
procedure Axis_Set_Title
(Axis : access Gtk_Plot_Axis_Record;
Title : String);
-
procedure Axis_Show_Title
(Axis : access Gtk_Plot_Axis_Record);
-
procedure Axis_Hide_Title
(Axis : access Gtk_Plot_Axis_Record);
-
procedure Axis_Move_Title
(Axis : access Gtk_Plot_Axis_Record;
Angle : Plot_Angle;
X : Gdouble;
Y : Gdouble);
-
-
procedure Axis_Set_Attributes
(Axis :
access Gtk_Plot_Axis_Record;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Axis_Get_Attributes
(Axis :
access Gtk_Plot_Axis_Record;
Width :
out Gfloat;
Color :
out Gdk.Color.Gdk_Color);
-
procedure Axis_Set_Ticks
(Axis : access Gtk_Plot_Axis_Record;
Major_Step : Gdouble;
Num_Minor : Gint);
-
procedure Axis_Set_Major_Ticks
(Axis : access Gtk_Plot_Axis_Record;
Major_Step : Gdouble);
-
procedure Axis_Set_Minor_Ticks
(Axis : access Gtk_Plot_Axis_Record;
Num_Minor : Gint);
-
procedure Axis_Set_Ticks_Length
(Axis : access Gtk_Plot_Axis_Record;
Length : Gint);
-
procedure Axis_Set_Ticks_Width
(Axis : access Gtk_Plot_Axis_Record;
Width : Gfloat);
-
procedure Axis_Show_Ticks
(Axis : access Gtk_Plot_Axis_Record;
Major_Mask : Plot_Ticks_Pos;
Minor_Mask : Plot_Ticks_Pos);
-
procedure Axis_Set_Ticks_Limits
(Axis : access Gtk_Plot_Axis_Record;
Ticks_Begin : Gdouble;
Ticks_End : Gdouble);
-
procedure Axis_Unset_Ticks_Limits
(Axis : access Gtk_Plot_Axis_Record);
-
procedure Axis_Set_Break
(Axis : access Gtk_Plot_Axis_Record;
Min, Max : Gdouble;
Step_After : Gdouble;
Nminor_After : Gint;
Scale_After : Plot_Scale;
Pos : Gdouble);
-
procedure Axis_Remove_Break (Axis : access Gtk_Plot_Axis_Record);
-
procedure Axis_Show_Labels
(Axis : access Gtk_Plot_Axis_Record;
Labels_Mask : Plot_Label_Pos);
-
-
-
procedure Axis_Set_Labels_Offset
(Axis : access Gtk_Plot_Axis_Record;
Offset : Gint);
-
function Axis_Get_Labels_Offset
(Axis : access Gtk_Plot_Axis_Record) return Gint;
-
procedure Axis_Set_Labels_Style
(Axis : access Gtk_Plot_Axis_Record;
Style : Plot_Label_Style;
Precision : Gint);
-
procedure Axis_Use_Custom_Tick_Labels
(Axis : access Gtk_Plot_Axis_Record;
Custom : Boolean := True);
-
procedure Axis_Set_Labels_Suffix
(Axis : access Gtk_Plot_Axis_Record;
Text : String);
-
procedure Axis_Set_Labels_Prefix
(Axis : access Gtk_Plot_Axis_Record;
Text : String);
-
function Axis_Get_Labels_Suffix
(Axis : access Gtk_Plot_Axis_Record) return String;
-
function Axis_Get_Labels_Prefix
(Axis : access Gtk_Plot_Axis_Record) return String;
-
procedure Axis_Ticks_Recalc (Axis : access Gtk_Plot_Axis_Record);
-
function Axis_Ticks_Transform
(Axis : access Gtk_Plot_Axis_Record;
Y : Gdouble) return Gdouble;
-
function Axis_Ticks_Inverse
(Axis : access Gtk_Plot_Axis_Record;
X : Gdouble) return Gdouble;
-
procedure Axis_Parse_Label
(Axis : access Gtk_Plot_Axis_Record;
Val : Gdouble;
Precision : Gint;
Style : Gint;
Label : String);
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).
-
procedure X0_Set_Visible
(Plot : access Gtk_Plot_Record;
Visible : Boolean);
-
function X0_Visible
(Plot : access Gtk_Plot_Record) return Boolean;
-
procedure Y0_Set_Visible
(Plot : access Gtk_Plot_Record;
Visible : Boolean);
-
function Y0_Visible
(Plot : access Gtk_Plot_Record) return Boolean;
-
procedure X0line_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Y0line_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Grids_Set_On_Top
(Plot : access Gtk_Plot_Record; On_Top : Boolean);
-
function Grids_On_Top (Plot : access Gtk_Plot_Record) return Boolean;
-
procedure Grids_Set_Visible
(Plot : access Gtk_Plot_Record;
Vmajor : Boolean;
Vminor : Boolean;
Hmajor : Boolean;
Hminor : Boolean);
-
procedure Grids_Visible
(Plot : access Gtk_Plot_Record;
Vmajor : out Boolean;
Vminor : out Boolean;
Hmajor : out Boolean;
Hminor : out Boolean);
-
procedure Major_Hgrid_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Major_Vgrid_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Minor_Hgrid_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
-
procedure Minor_Vgrid_Set_Attributes
(Plot :
access Gtk_Plot_Record;
Style : Plot_Line_Style;
Width : Gfloat;
Color :
Gdk.Color.Gdk_Color);
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);
-
procedure Hide_Legends (Plot : access Gtk_Plot_Record);
-
procedure Set_Legends_Border
(Plot : access Gtk_Plot_Record;
Border : Plot_Border_Style;
Shadow_Width : Gint);
-
procedure Legends_Move
(Plot : access Gtk_Plot_Record;
X : Gdouble;
Y : Gdouble);
-
procedure Legends_Get_Position
(Plot : access Gtk_Plot_Record;
X : out Gdouble;
Y : out Gdouble);
-
-
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);
-
function Remove_Data
(Plot : access Gtk_Plot_Record;
Data : access Gtk_Plot_Data_Record'Class)
return Boolean;
-
function Add_Function
(Plot : access Gtk_Plot_Record;
Func : Plot_Function)
return Gtk_Plot_Data;