| GTK-EXTRA - Reference Manual

| Home

## Name

### Gtkplot - 2d scientific plots widget for gtk+

## Synopsis

## Plot related functions

    GtkType

    gtk_plot_get_type

    (void);

    GtkWidget*

    gtk_plot_new

    (GdkDrawable *drawable);

    GtkWidget*

    gtk_plot_new_with_size

    (GdkDrawable *drawable,
    gdouble width, gdouble height);

    void

    gtk_plot_construct

    (GtkPlot *plot,
    GdkDrawable *drawable);

    void

    gtk_plot_construct_with_size

    (GtkPlot *plot,
    GdkDrawable *drawable,
    gdouble width, gdouble height);

    void

    gtk_plot_set_drawable

    (GtkPlot *plot,
    GdkDrawable *drawable);

    GdkDrawable *

    gtk_plot_get_drawable

    (GtkPlot *plot);

    void

    gtk_plot_set_pc

    (GtkPlot *plot,
    GtkPlotPC *pc);

    void

    gtk_plot_set_background_pixmap

    (GtkPlot *plot,
    GdkPixmap *pixmap);

    void

    gtk_plot_set_transparent

    (GtkPlot *plot,
    gboolean transparent);

    gboolean

    gtk_plot_is_transparent

    (GtkPlot *plot);

    void

    gtk_plot_get_position

    (GtkPlot *plot,
    gdouble *x, gdouble *y);

    void

    gtk_plot_get_size

    (GtkPlot *plot,
    gdouble *width,
    gdouble *height);

    GtkAllocation

    gtk_plot_get_internal_allocation

    (GtkPlot *plot);

    void

    gtk_plot_set_background

    (GtkPlot *plot,
    const GdkColor *background);

    void

    gtk_plot_paint

    (GtkPlot *plot);

    void

    gtk_plot_refresh

    (GtkPlot *plot,
    GdkRectangle *area);

    void

    gtk_plot_move

    (GtkPlot *plot,
    gdouble x, gdouble y);

    void

    gtk_plot_resize

    (GtkPlot *plot,
    gdouble width, gdouble height);

    void

    gtk_plot_set_magnification

    (GtkPlot *plot,
    gdouble magnification);

    void

    gtk_plot_move_resize

    (GtkPlot *plot,
     gdouble x, gdouble y,
    gdouble width, gdouble height);

    void

    gtk_plot_get_pixel

    (GtkPlot *plot,
    gdouble xx, gdouble yy,
    gdouble *x, gdouble *y);

    void

    gtk_plot_get_point

    (GtkPlot *plot,
    gint x, gint y,
    gdouble *xx, gdouble *yy);

    void

    gtk_plot_clip_data

    (GtkPlot *plot, gboolean clip);

    void

    gtk_plot_set_xrange

    (GtkPlot *plot,
    gdouble xmin, gdouble xmax);

    void

    gtk_plot_set_yrange

    (GtkPlot *plot,
     gdouble ymin, gdouble ymax);

    void

    gtk_plot_set_range

    (GtkPlot *plot,
    gdouble xmin, gdouble xmax,
    gdouble ymin, gdouble ymax);

    void

    gtk_plot_autoscale

    (GtkPlot *plot);

    void

    gtk_plot_get_xrange

    (GtkPlot *plot,
    gdouble *xmin, gdouble *xmax);

    void

    gtk_plot_get_yrange

    GtkPlot *plot,
    gdouble *ymin, gdouble *ymax);

    void

    gtk_plot_set_xscale

    (GtkPlot *plot,
    GtkPlotScale scale_type);

    void

    gtk_plot_set_yscale

    (GtkPlot *plot,
    GtkPlotScale scale_type);

    GtkPlotScale

    gtk_plot_get_xscale

    (GtkPlot *plot);

    GtkPlotScale

    gtk_plot_get_yscale

    (GtkPlot *plot);

    gtk_plot_put_text

    GtkPlot *plot,
    gdouble x, gdouble y,
    const gchar *font,
    gint height,
    gint angle,
    const GdkColor *foreground,
    const GdkColor *background,
    gboolean transparent,
    GtkJustification justification,
    const gchar *text);

    gint

    gtk_plot_remove_text

    (GtkPlot *plot,
     GtkPlotText *text);

    void

    gtk_plot_text_get_size

    (const gchar *text,
    gint angle,
    const gchar *font_name,
    gint font_size,
    gint *width, gint *height,
    gint *ascent, gint *descent);

    void

    gtk_plot_text_get_area

    (const gchar *text,
    gint angle,
    GtkJustification just,
    const gchar *font_name,
    gint font_size,
    gint *x, gint *y,
    gint *width, gint *height);

    void

    gtk_plot_text_set_attributes

    (GtkPlotText *text_attr,
    const gchar *font,
    gint height,
    gint angle,
    const GdkColor *fg,
    const GdkColor *bg,
    gboolean transparent,
    GtkJustification justification,
    const gchar *text);

    void

    gtk_plot_text_set_border

    (GtkPlotText *text,
    GtkPlotBorderStyle border,
    gint border_space,
    gint border_width,
    gint shadow_width);

    void

    gtk_plot_draw_line

    (GtkPlot *plot,
    GtkPlotLine line,
    gdouble x1, gdouble y1,
    gdouble x2, gdouble y2);

    void

    gtk_plot_draw_text

    (GtkPlot *plot,
    GtkPlotText text);

## Axis related functions

    GtkObject*

    gtk_plot_axis_new

    (GtkPlotOrientation orientation);

    void

    gtk_plot_axis_construct

    (GtkPlotAxis *axis,
    GtkPlotOrientation orientation);

    GtkPlotAxis *

    gtk_plot_get_axis

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

    void

    gtk_plot_axis_set_visible

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gboolean visible);

    gboolean

    gtk_plot_axis_visible

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

    void

    gtk_plot_axis_set_title

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    const gchar *title);

    void

    gtk_plot_axis_show_title

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

    void

    gtk_plot_axis_hide_title

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

    void

    gtk_plot_axis_move_title

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint angle,
    gdouble x, gdouble y);

    void

    gtk_plot_axis_justify_title

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    GtkJustification justification);

    void

    gtk_plot_axis_set_attributes

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gfloat width,
    const GdkColor *color);

    void

    gtk_plot_axis_get_attributes

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gfloat *width,
    GdkColor *color);

    void

    gtk_plot_axis_set_ticks

    (GtkPlot *plot,
    GtkPlotOrientation orientation,
    gdouble major_step,
    gint nminor);

    void

    gtk_plot_axis_set_major_ticks

    (GtkPlot *plot,
    GtkPlotOrientation orientation,
    gdouble major_step);

    void

    gtk_plot_axis_set_minor_ticks

    (GtkPlot *plot,
    GtkPlotOrientation orientation,
    gint nminor);

    void

    gtk_plot_axis_set_ticks_length

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint length);

    void

    gtk_plot_axis_set_ticks_width

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gfloat width);

    void

    gtk_plot_axis_show_ticks

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint major_mask,
    gint minor_mask);

    void

    gtk_plot_axis_set_ticks_limits

    (GtkPlot *plot,
    GtkPlotOrientation orientation,
    gdouble begin, gdouble end);

    void

    gtk_plot_axis_unset_ticks_limits

    (GtkPlot *plot,
    GtkPlotOrientation orientation);

    void

    gtk_plot_axis_show_labels

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint labels_mask);

    void

    gtk_plot_axis_title_set_attributes

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    const gchar *font,
    gint height,
    gint angle,
    const GdkColor *foreground,
    const GdkColor *background,
    gboolean transparent,
    GtkJustification justification);

    void

    gtk_plot_axis_set_labels_attributes

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    const gchar *font,
    gint height,
    gint angle,
    const GdkColor *foreground,
    const GdkColor *background,
    gboolean transparent,
    GtkJustification justification);

    void

    gtk_plot_axis_set_labels_numbers

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint style,
    gint precision);

    void

    gtk_plot_axis_set_labels_offset

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    gint offset);

    gint

    gtk_plot_axis_get_labels_offset

    (GtkPlot *plot,
     GtkPlotAxisPos axis);

    void

    gtk_plot_axis_use_custom_tick_labels

    (GtkPlot *plot,
    GtkPlotAxisPos axispos,
    gboolean use);

    void

    gtk_plot_axis_set_labels_suffix

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    const gchar *text);

    void

    gtk_plot_axis_set_labels_prefix

    (GtkPlot *plot,
    GtkPlotAxisPos axis,
    const gchar *text);

    gchar *

    gtk_plot_axis_get_labels_suffix

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

    gchar *

    gtk_plot_axis_get_labels_prefix

    (GtkPlot *plot,
    GtkPlotAxisPos axis);

## Grid related functions

    void

    gtk_plot_x0_set_visible

    (GtkPlot *plot,
    gboolean visible);

    gboolean

    gtk_plot_x0_visible

    (GtkPlot *plot);

    void

    gtk_plot_y0_set_visible

    (GtkPlot *plot,
    gboolean visible);

gboolean | gtk_plot_y0_visible | (GtkPlot *plot);

    void

    gtk_plot_grids_set_on_top

    (GtkPlot *plot,
    gboolean on_top);

    void

    gtk_plot_grids_set_visible

    (GtkPlot *plot,
    gboolean vmajor,
    gboolean vminor,
    gboolean hmajor,
    gboolean hminor);

    void

    gtk_plot_grids_visible

    (GtkPlot *plot,
    gboolean *vmajor,
    gboolean *vminor,
    gboolean *hmajor,
    gboolean *hminor);

    void

    gtk_plot_y0line_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    gfloat width,
    const GdkColor *color);

    void

    gtk_plot_x0line_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    gfloat width,
    const GdkColor *color);

    void

    gtk_plot_major_vgrid_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    float width,
    const GdkColor *color);

    void

    gtk_plot_minor_vgrid_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    gfloat width,
    const GdkColor *color);

    void

    gtk_plot_major_hgrid_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    gfloat width,
    const GdkColor *color);

    void

    gtk_plot_minor_hgrid_set_attributes

    (GtkPlot *plot,
    GtkPlotLineStyle style,
    gfloat width,
    const GdkColor *color);

## Legends related functions

    void

    gtk_plot_show_legends

    (GtkPlot *plot);

    void

    gtk_plot_hide_legends

    (GtkPlot *plot);

    void

    gtk_plot_set_legends_border

    (GtkPlot *plot,
    GtkPlotBorderStyle border,
    gint shadow_width);

    void

    gtk_plot_legends_move

    (GtkPlot *plot,
    gdouble x, gdouble y);

    void

    gtk_plot_legends_get_position

    (GtkPlot *plot,
    gdouble *x, gdouble *y);

    GtkAllocation

    gtk_plot_legends_get_allocation

    (GtkPlot *plot);

    void

    gtk_plot_legends_set_attributes

    (GtkPlot *plot,
    const gchar *font,
    gint height,
    const GdkColor *foreground,
    const GdkColor *background);

    void

    gtk_plot_set_line_attributes

    (GtkPlot *plot,
    GtkPlotLine line);

## Datasets related functions

    void

    gtk_plot_add_data

    (GtkPlot *plot,
     GtkPlotData *data);

    gint

    gtk_plot_remove_data

    (GtkPlot *plot,
    GtkPlotData *data);

    GtkPlotData *

    gtk_plot_add_function

    (GtkPlot *plot,
    GtkPlotFunc function);

## Object Hierarchy

##
Args

## Signal Prototypes

GtkPlot signals | GtkPlotData signals | GtkPlotAxis signals

## Description

####
GtkPlot is a widget for GTK+. It allows to draw high quality scientific plots in two dimensions with a look and feel very similar to Microcal Origin for Windows.
The distribution includes GtkPlotCanvas subclass, and a demo program showing two layered plots with different kind of curves.
You can choose between a number of symbol types, lines, connectors -straight lines, steps, splines-, and change their attributes -color, size, width-.
You can also plot functions, add error bars, edit legends, rotate and move axis titles, change axis properties, etc.

#### The package also includes GtkPlot3D and GtkPlotPolar.
GtkPlotCanvas is a GtkFixed subclass and allows to DnD plots, points, and child objects (text, axis titles). You can move them or resize your plots dragging with the mouse!
The distribution includes also a PostScript driver.

##
Details

    struct GtkPlot;
    struct GtkPlotAxis;
    struct GtkPlotText;
    struct GtkPlotLine;
    struct GtkPlotSymbol;
    struct GtkPlotTicks;
    struct GtkPlotVector;
    struct GtkPlotMarker;

## Screenshots

### gtk_plot_get_type ()

    GtkType gtk_plot_get_type (void);

##

### gtk_plot_new ()

    GtkWidget* gtk_plot_new (GdkDrawable *drawable);

Create a news GtkPlot widget

drawable | A drawable Gdk widget
Returns | a new GtkPlot widget

### gtk_plot_new_with_size ()

    GtkWidget* gtk_plot_new_with_size (GdkDrawable *drawable,
                                       gdouble width, gdouble height);

Create a new GtkPlot widget with specified dimensions

drawable | A drawable Gdk widget
width,height | Width,height of the new GtkPlot widget
Returns | a new GtkPlot widget

### gtk_plot_construct ()

    void gtk_plot_construct (GtkPlot *plot,
                             GdkDrawable *drawable);

.Initialize a GtkPlot structure.

plot | a GtkPlot widget
drawable | A drawable Gdk widget

### gtk_plot_construct_with_size ()

    void gtk_plot_construct_with_size (GtkPlot *plot,
                                      GdkDrawable *drawable,
                                      gdouble width, gdouble height);

.Initialize a GtkPlot structure with specified dimensions

plot | a GtkPlot widget
drawable | A drawable Gdk widget
width,height | Width,height of the new GtkPlot widget

### gtk_plot_set_drawable ()

    void gtk_plot_set_drawable (GtkPlot *plot,
                                GdkDrawable *drawable);

Set the drawable widget for plot.

plot | a GtkPlot widget
drawable | A drawable Gdk widget

### gtk_plot_get_drawable ()

    GdkDrawable * gtk_plot_get_drawable (GtkPlot *plot);

Get the drawable widget for plot.

plot | a GtkPlot widget
Returns | A drawable Gdk widget

### gtk_plot_set_pc ()

    void gtk_plot_set_pc (GtkPlot *plot,
                          GtkPlotPC *pc);

Set the gtkplot printing context(a renderer for printing functions) for plot.
For more details see GtkPlotPC

plot | a GtkPlot widget
pc | printing context

### gtk_plot_set_background_pixmap ()

    void gtk_plot_set_background_pixmap (GtkPlot *plot,
                                         GdkPixmap *pixmap);

Set the background (pixmap) for the plot.

plot | a GtkPlot widget
pixmap | Pixmap for the background

### gtk_plot_set_transparent ()

    void gtk_plot_set_transparent (GtkPlot *plot,
                                   gboolean transparent);

Set the plot transparency.

plot | a GtkPlot widget
transparent | TRUE or FALSE

### gtk_plot_is_transparent ()

    gboolean gtk_plot_is_transparent (GtkPlot *plot);

Get the plot transparency

plot | a GtkPlot widget
Returns | TRUE or FALSE

### gtk_plot_get_position ()

    void gtk_plot_get_position (GtkPlot *plot,
                                gdouble *x, gdouble *y);

Get the plot position. The coordinates are stored in x,y.

plot | a GtkPlot widget
*x,*y | coordinates

### gtk_plot_get_size ()

    void gtk_plot_get_size (GtkPlot *plot,
                            gdouble *width,
                            gdouble *height);

Get the plot size.The sizes are stored in width,height

plot | a GtkPlot widget
*width,*height | sizes

### gtk_plot_get_internal_allocation ()

    GtkAllocation gtk_plot_get_internal_allocation(GtkPlot *plot);

Get the internal allocation of the plot.

plot | a GtkPlot widget
Returns | internal allocation

### gtk_plot_set_background ()

    void gtk_plot_set_background (GtkPlot *plot,
                                  const GdkColor *background);

Set the color of the plot bakcground.

plot | a GtkPlot widget
background | the color of the background

### gtk_plot_paint ()

    void gtk_plot_paint (GtkPlot *plot);

Paint the plot(kinda gtk_widget_show_all)

plot | a GtkPlot widget

### gtk_plot_refresh ()

    void gtk_plot_refresh (GtkPlot *plot,
                           GdkRectangle *area);

Refresh a certain area of the plot.

plot | a GtkPlot widget
area | area to be refreshed

### gtk_plot_move ()

    void gtk_plot_move (GtkPlot *plot,
                       gdouble x, gdouble y);

Move the plot to the specified coordinates.

plot | a GtkPlot widget
x,y | coordinates

### gtk_plot_resize ()

    void gtk_plot_resize (GtkPlot *plot,
                         gdouble width, gdouble height);

Resize the plot to the specified sizes.

plot | a GtkPlot widget
height,width | sizes

### gtk_plot_set_magnification ()

    void gtk_plot_set_magnification (GtkPlot *plot,
                                   gdouble magnification);

Set the magnification of the plot.

plot | a GtkPlot widget
magnification | magnification degree

### gtk_plot_move_resize ()

    void gtk_plot_move_resize (GtkPlot *plot,
                               gdouble x, gdouble y,
                               gdouble width, gdouble height);

Move && resize the plot.

plot | a GtkPlot widget
x,y | move coordinates
height,width | resize coordinates

### gtk_plot_get_pixel ()

    void gtk_plot_get_pixel (GtkPlot *plot,
                            gdouble xx, gdouble yy,
                            gdouble *x, gdouble *y);

plot |
xx,yy |
*x,*y |

### gtk_plot_get_point ()

    void gtk_plot_get_point (GtkPlot *plot,
                            gint x, gint y,
                            gdouble *xx, gdouble *yy);

plot |
x,y |
*xx,*yy |

### gtk_plot_clip_data ()

    void gtk_plot_clip_data (GtkPlot *plot, gboolean clip);

plot |
clip |

### gtk_plot_set_xrange ()

    void gtk_plot_set_xrange (GtkPlot *plot,
                              gdouble xmin, gdouble xmax);

plot |
xmin,xmax |

### gtk_plot_set_yrange ()

    void gtk_plot_set_yrange (GtkPlot *plot,
                              gdouble ymin, gdouble ymax);

plot |
ymin,ymax |

### gtk_plot_set_range ()

    void gtk_plot_set_range (GtkPlot *plot,
                             gdouble xmin, gdouble xmax,
                             gdouble ymin, gdouble ymax);

plot |
ymin,ymax |
xmin,xmax |

### gtk_plot_autoscale ()

    void gtk_plot_autoscale (GtkPlot *plot);

plot |

### gtk_plot_get_xrange ()

    void gtk_plot_get_xrange (GtkPlot *plot,
                              gdouble *xmin, gdouble *xmax);

plot |
*xmin,*xmax |

### gtk_plot_get_yrange ()

    void gtk_plot_get_yrange (GtkPlot *plot,
                              gdouble *ymin, gdouble *ymax);

plot |
*ymin,*ymax |

### gtk_plot_set_xscale ()

    void gtk_plot_set_xscale (GtkPlot *plot,
                             GtkPlotScale scale_type);

Set the scale type for x axis(linear or logarithmic)

plot | a GtkPlot Widget
scale_type | GTK_PLOT_SCALE_LINEAR or GTK_PLOT_SCALE_LOG10

### gtk_plot_set_yscale ()

    void gtk_plot_set_yscale (GtkPlot *plot,
                             GtkPlotScale scale_type);

Set the scale type for y axis(linear or logarithmic)

plot | a GtkPlot Widget
scale_type | GTK_PLOT_SCALE_LINEAR or GTK_PLOT_SCALE_LOG10

### gtk_plot_get_xscale ()

    GtkPlotScale gtk_plot_get_xscale (GtkPlot *plot);

Get the scale type for xaxis(linear or logarithmic)

plot | a GtkPlot Widget
Returns | GTK_PLOT_SCALE_LINEAR or GTK_PLOT_SCALE_LOG10

### gtk_plot_get_yscale ()

    GtkPlotScale gtk_plot_get_yscale (GtkPlot *plot);

Get the scale type for y axis(linear or logarithmic)

plot | a GtkPlot Widget
Returns | GTK_PLOT_SCALE_LINEAR or GTK_PLOT_SCALE_LOG10

### gtk_plot_put_text ()

    GtkPlotText * gtk_plot_put_text (GtkPlot *plot,
                                     gdouble x, gdouble y,
                                     const gchar *font,
                                     gint height,
                                     gint angle,
                                     const GdkColor *foreground,
                                     const GdkColor *background,
                                     gboolean transparent,
                                     GtkJustification justification,
                                     const gchar *text);

Insert text in a plot.

plot | a GtkPlot Widget
x,y | coordinates where the text is inserted
font | text font
height | text height
angle | the angle at which the text is inclined
foreground,background | colors of text,background
transparent | transparency of text (TRUE or FALSE)
justification | GTK_JUSTIFY_LEFT, RIGHT, CENTER
text | string pointer
Returns | a GtkPlot widget

### gtk_plot_remove_text ()

    gint gtk_plot_remove_text (GtkPlot *plot,
                              GtkPlotText *text);

Remove text from the plot

plot | a GtkPlot widget
text | a GtkPlotText Widget
Returns | TRUE -> success FALSE -> no valid widget

### gtk_plot_text_get_size ()

    void gtk_plot_text_get_size (const gchar *text,
                                 gint angle,
                                 const gchar *font_name,
                                 gint font_size,
                                 gint *width, gint *height,
                                 gint *ascent, gint *descent);

Get plot text size .

text | string pointer
angle | angle of invlination of the text
font_name | name of the font
font_size | size of the font
*width,*height | here we store height , width
*ascent,*descent | here we store ascent,descent

### gtk_plot_text_get_area ()

    void gtk_plot_text_get_area (const gchar *text,
                                gint angle,
                                GtkJustification just,
                                const gchar *font_name,
                                gint font_size,
                                gint *x, gint *y,
                                gint *width, gint *height);

Get the area of the plot text

text | string pointer
angle | angle of inclination of text
just | GTK_JUSTIFY_LEFT, RIGHT, CENTER
font_name | name of the font
font_size | size of the font
*x,*y |
*width,*height | here we store height , width

### gtk_plot_text_set_attributes ()

    void gtk_plot_text_set_attributes (GtkPlotText *text_attr,
                                      const gchar *font,
                                      gint height,
                                      gint angle,
                                      const GdkColor *fg,
                                      const GdkColor *bg,
                                      gboolean transparent,
                                      GtkJustification justification,
                                      const gchar *text);

Set the attributes of the plot text.

text_attr | GtkPlotText widget
font | font name
height | height of the font
angle | inclination angle of the text
fg,bg | foreground , background color of the text
transparent | transparency of the text(TRUE or FALSE)
justification | GTK_JUSTIFY_LEFT, RIGHT, CENTER
text | string pointer

### gtk_plot_text_set_border ()

    void gtk_plot_text_set_border (GtkPlotText *text,
                                  GtkPlotBorderStyle border,
                                  gint border_space,
                                  gint border_width,
                                  gint shadow_width);

Set border for the plot text

text | GtkPlotText widget
border | GTK_PLOT_BORDER_NONE or GTK_PLOT_BORDER_LINE or GTK_PLOT_BORDER_SHADOW
border_space | border space
border_width | border width
shadow_width | border shadow width

### gtk_plot_draw_line ()

    void gtk_plot_draw_line (GtkPlot *plot,
                             GtkPlotLine line,
                             gdouble x1, gdouble y1,
                             gdouble x2, gdouble y2);

Draw a line in the plot specified by two pairs of points

plot | a GtkPlot widget
line | a GtkPlot:Line widget
x1,y1 | 1st point
x2,y2 | 2nd point

### gtk_plot_draw_text ()

    void gtk_plot_draw_text (GtkPlot *plot,
                            GtkPlotText text);

Draw the text plot.

plot | a GtkPlot widget
text | a GtkPlotText widget

### gtk_plot_axis_new ()

    GtkObject* gtk_plot_axis_new (GtkPlotOrientation orientation);

Create a new axis.

orientation | GTK_PLOT_AXIS_X or GTK_PLOT_AXIS_Y or GTK_PLOT_AXIS_Z
Returns | a new GtkObject axis

### gtk_plot_axis_construct ()

    void gtk_plot_axis_construct (GtkPlotAxis *axis,
                                 GtkPlotOrientation orientation);

Initialize a GtkPlotAxis structure

axis | a GtkPlotAxis widget
orientation | GTK_PLOT_AXIS_X or GTK_PLOT_AXIS_Y or GTK_PLOT_AXIS_Z

### gtk_plot_get_axis ()

    GtkPlotAxis * gtk_plot_get_axis (GtkPlot *plot,
                                     GtkPlotAxisPos axis);

Get the plot axis widget in any direction

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM

### gtk_plot_axis_set_visible ()

    void gtk_plot_axis_set_visible (GtkPlot *plot,
                                    GtkPlotAxisPos axis,
                                    gboolean visible);

Set axis visible or not.

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
visible | TRUE or FALSE

### gtk_plot_axis_visible ()

    gboolean gtk_plot_axis_visible (GtkPlot *plot,
                                    GtkPlotAxisPos axis);

Get the visibility of the axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
Returns | TRUE or FALSE

### gtk_plot_axis_set_title ()

    void gtk_plot_axis_set_title (GtkPlot *plot,
                                 GtkPlotAxisPos axis,
                                 const gchar *title);

Set the title of the axis.

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
title | title of the axis

### gtk_plot_axis_show_title ()

    void gtk_plot_axis_show_title (GtkPlot *plot,
                                  GtkPlotAxisPos axis);

Show the title of the axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM

### gtk_plot_axis_hide_title ()

    void gtk_plot_axis_hide_title (GtkPlot *plot,
                                  GtkPlotAxisPos axis);

Hide the title of the axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM

### gtk_plot_axis_move_title ()

    void gtk_plot_axis_move_title (GtkPlot *plot,
                                   GtkPlotAxisPos axis,
                                   gint angle,
                                   gdouble x, gdouble y);

Move the title of the axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
angle | inclination angle of the axis
x,y | new coordinates of the axis

### gtk_plot_axis_justify_title ()

    void gtk_plot_axis_justify_title (GtkPlot *plot,
                                     GtkPlotAxisPos axis,
                                     GtkJustification justification);

Justify the title of the axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
justification | GTK_JUSTIFY_LEFT, RIGHT, CENTER

### gtk_plot_axis_set_attributes ()

    void gtk_plot_axis_set_attributes (GtkPlot *plot,
                                      GtkPlotAxisPos axis,
                                      gfloat width,
                                      const GdkColor *color);

Set the attributes of the plot axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
width | width of the axis
color | color of the axis

### gtk_plot_axis_get_attributes ()

    void gtk_plot_axis_get_attributes (GtkPlot *plot,
                                      GtkPlotAxisPos axis,
                                      gfloat *width,
                                      GdkColor *color);

Get the attributes of the plot axis

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
*width | width of the axis
*color | color of the axis

### gtk_plot_axis_set_ticks ()

    void gtk_plot_axis_set_ticks (GtkPlot *plot,
                                  GtkPlotOrientation orientation,
                                  gdouble major_step,
                                  gint nminor);

plot |
orientation |
major_step |
nminor |

### gtk_plot_axis_set_major_ticks ()

    void gtk_plot_axis_set_major_ticks (GtkPlot *plot,
                                        GtkPlotOrientation orientation,
                                        gdouble major_step);

plot |
orientation |
major_step |

### gtk_plot_axis_set_minor_ticks ()

    void gtk_plot_axis_set_minor_ticks (GtkPlot *plot,
                                        GtkPlotOrientation orientation,
                                        gint nminor);

plot |
orientation |
minor |

### gtk_plot_axis_set_ticks_length ()

    void gtk_plot_axis_set_ticks_length (GtkPlot *plot,
                                         GtkPlotAxisPos axis,
                                         gint length);

plot |
axis |
length |

### gtk_plot_axis_set_ticks_width ()

    void gtk_plot_axis_set_ticks_width (GtkPlot *plot,
                                        GtkPlotAxisPos axis,
                                        gfloat width);

plot |
axis |
width |

### gtk_plot_axis_show_ticks ()

    void gtk_plot_axis_show_ticks (GtkPlot *plot,
                                   GtkPlotAxisPos axis,
                                   gint major_mask,
                                   gint minor_mask);

plot |
axis |
major_mask |
minor_mask |

### gtk_plot_axis_set_ticks_limits ()

    void gtk_plot_axis_set_ticks_limits (GtkPlot *plot,
                                        GtkPlotOrientation orientation,
                                        gdouble begin, gdouble end);

plot |
orientation |
begin |
end |

### gtk_plot_axis_unset_ticks_limits ()

    void gtk_plot_axis_unset_ticks_limits(GtkPlot *plot,
                                         GtkPlotOrientation orientation);

plot |
orientation |

### gtk_plot_axis_show_labels ()

    void gtk_plot_axis_show_labels (GtkPlot *plot,
                                    GtkPlotAxisPos axis,
                                    gint labels_mask);

plot |
axis |
label_mask |

### gtk_plot_axis_title_set_attributes ()

    void gtk_plot_axis_title_set_attributes (GtkPlot *plot,
                                            GtkPlotAxisPos axis,
                                            const gchar *font,
                                            gint height,
                                            gint angle,
                                            const GdkColor *foreground,
                                            const GdkColor *background,
                                            gboolean transparent,
                                            GtkJustification justification);

Set the attributes of the axis title

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
font | font name
height | height of the font
angle | inclination angle of the axis title
foreground,background | color of the text
tranparent | transparency of the title(TRUE or FALSE)
justification | GTK_JUSTIFY_LEFT, RIGHT, CENTER

### gtk_plot_axis_set_labels_attributes ()

    void gtk_plot_axis_set_labels_attributes (GtkPlot *plot,
                                             GtkPlotAxisPos axis,
                                             const gchar *font,
                                             gint height,
                                             gint angle,
                                             const GdkColor *foreground,
                                             const GdkColor *background,
                                             gboolean transparent,
                                             GtkJustification justification);

Set the attributes of the axis labels

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
font | font name
height | height of the font
angle | inclination angle of the axis title
foreground,background | color of the text
tranparent | transparency of the title(TRUE or FALSE)
justification | GTK_JUSTIFY_LEFT, RIGHT, CENTER

### gtk_plot_axis_set_labels_numbers ()

    void gtk_plot_axis_set_labels_numbers (GtkPlot *plot,
                                           GtkPlotAxisPos axis,
                                           gint style,
                                           gint precision);

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
style |
precision |

### gtk_plot_axis_set_labels_offset ()

    void gtk_plot_axis_set_labels_offset (GtkPlot *plot,
                                         GtkPlotAxisPos axis,
                                         gint offset);

Set the offset of the axis labels

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
offset | offset of the labels

### gtk_plot_axis_get_labels_offset ()

    gint gtk_plot_axis_get_labels_offset (GtkPlot *plot,
                                          GtkPlotAxisPos axis);

Get the labels offset

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
Returns | the offset

### gtk_plot_axis_use_custom_tick_labels ()

    void gtk_plot_axis_use_custom_tick_labels (GtkPlot *plot,
                                              GtkPlotAxisPos axispos,
                                              gboolean use);

plot |
axispos |
use |

### gtk_plot_axis_set_labels_suffix ()

    void gtk_plot_axis_set_labels_suffix (GtkPlot *plot,
                                          GtkPlotAxisPos axis,
                                          const gchar *text);

Set a suffix(append a string) to labels.

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
text | suffix

### gtk_plot_axis_set_labels_prefix ()

    void gtk_plot_axis_set_labels_prefix (GtkPlot *plot,
                                          GtkPlotAxisPos axis,
                                          const gchar *text);

Set a prefix(insert a string at he beginning of the name) to labels.

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
text | prefix

### gtk_plot_axis_get_labels_suffix ()

    gchar * gtk_plot_axis_get_labels_suffix (GtkPlot *plot,
                                             GtkPlotAxisPos axis);

Get the suffix of the labels

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
Returns | the suffix

### gtk_plot_axis_get_labels_prefix ()

    gchar * gtk_plot_axis_get_labels_prefix (GtkPlot *plot,
                                             GtkPlotAxisPos axis);

Get the prefix of the labels

plot | a GtkPlot widget
axis | GTK_PLOT_AXIS_LEFT or GTK_PLOT_AXIS_RIGHT or GTK_PLOT_AXIS_TOP or GTK_PLOT_AXIS_BOTTOM
Returns | the prefix

### gtk_plot_x0_set_visible ()

    void gtk_plot_x0_set_visible (GtkPlot *plot,
                                  gboolean visible);

plot |
visible |

### gtk_plot_x0_visible ()

    gboolean gtk_plot_x0_visible (GtkPlot *plot);

plot |

### gtk_plot_y0_set_visible ()

    void gtk_plot_y0_set_visible (GtkPlot *plot,
                                  gboolean visible);

plot |
visible |

### gtk_plot_y0_visible ()

    gboolean gtk_plot_y0_visible (GtkPlot *plot);

plot |

### gtk_plot_grids_set_on_top ()

    void gtk_plot_grids_set_on_top (GtkPlot *plot,
                                    gboolean on_top);

Set grid on top of the plot

plot | A GtkPlot widget
on_top | TRUE or FALSE

### gtk_plot_grids_on_top ()

    gboolean gtk_plot_grids_on_top (GtkPlot *plot);

See if grids are on top of the plot

plot | A GtkPlot widget
Returns | TRUE or FALSE

### gtk_plot_grids_set_visible ()

    void gtk_plot_grids_set_visible (GtkPlot *plot,
                                     gboolean vmajor,
                                     gboolean vminor,
                                     gboolean hmajor,
                                     gboolean hminor);

plot |
vmajor,vminor |
hmajor,hminor |

### gtk_plot_grids_visible ()

    void gtk_plot_grids_visible (GtkPlot *plot,
                                 gboolean *vmajor,
                                 gboolean *vminor,
                                 gboolean *hmajor,
                                 gboolean *hminor);

plot |
*vmajor,*vminor |
*hmajor,*hminor |

### gtk_plot_y0line_set_attributes ()

    void gtk_plot_y0line_set_attributes (GtkPlot *plot,
                                         GtkPlotLineStyle style,
                                         gfloat width,
                                         const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_x0line_set_attributes ()

    void gtk_plot_x0line_set_attributes (GtkPlot *plot,
                                         GtkPlotLineStyle style,
                                         gfloat width,
                                         const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_major_vgrid_set_attributes ()

    void gtk_plot_major_vgrid_set_attributes (GtkPlot *plot,
                                              GtkPlotLineStyle style,
                                              gfloat width,
                                              const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_minor_vgrid_set_attributes ()

    void gtk_plot_minor_vgrid_set_attributes (GtkPlot *plot,
                                              GtkPlotLineStyle style,
                                              gfloat width,
                                              const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_major_hgrid_set_attributes ()

    void gtk_plot_major_hgrid_set_attributes (GtkPlot *plot,
                                              GtkPlotLineStyle style,
                                              gfloat width,
                                              const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_minor_hgrid_set_attributes ()

    void gtk_plot_minor_hgrid_set_attributes (GtkPlot *plot,
                                              GtkPlotLineStyle style,
                                              gfloat width,
                                              const GdkColor *color);

plot |
style |
width |
color |

### gtk_plot_show_legends ()

    void gtk_plot_show_legends (GtkPlot *plot);

Show legends on the plot.

plot | a GtkPlot widget

### gtk_plot_hide_legends ()

    void gtk_plot_hide_legends (GtkPlot *plot);

Hide legends from the plot

plot | A GtkPlot widget

### gtk_plot_set_legends_border ()

    void gtk_plot_set_legends_border (GtkPlot *plot,
                                      GtkPlotBorderStyle border,
                                      gint shadow_width);

Set the border properties of the legends

plot | A GtkPlot widget
border | GTK_PLOT_BORDER_NONE or GTK_PLOT_BORDER_LINE or GTK_PLOT_BORDER_SHADOW
shadow_width | the width of the shadow

### gtk_plot_legends_move ()

    void gtk_plot_legends_move (GtkPlot *plot,
                                gdouble x, gdouble y);

Move the legend to a different point

plot | A GtkPlot widget
x,y | new coordinates of the legend

### gtk_plot_legends_get_position ()

    void gtk_plot_legends_get_position (GtkPlot *plot,
                                        gdouble *x, gdouble *y);

Get the position of the legends in the plot

plot | A GtkPlot widget
*x,*y | the position

### gtk_plot_legends_get_allocation ()

    GtkAllocation gtk_plot_legends_get_allocation (GtkPlot *plot);

Get the allocation of the legend

plot | A GtkPlot widget
Returns | the allocation

### gtk_plot_legends_set_attributes ()

    void gtk_plot_legends_set_attributes (GtkPlot *plot,
                                          const gchar *font,
                                          gint height,
                                          const GdkColor *foreground,
                                          const GdkColor *background);

Set the attributes of the legends in the plot

plot | A GtkPlot widget
font | font name
height | height of the font
foreground,background | colors of the text

### gtk_plot_set_line_attributes ()

    void gtk_plot_set_line_attributes (GtkPlot *plot,
                                       GtkPlotLine line);

plot |
line |

### gtk_plot_add_data ()

    void gtk_plot_add_data (GtkPlot *plot,
                            GtkPlotData *data);

Add data to the plot widget

plot | A GtkPlot widget
data | data pointer

### gtk_plot_remove_data ()

    gint gtk_plot_remove_data (GtkPlot *plot,
                               GtkPlotData *data);

Remove data attached to the widget

plot | A GtkPlot widget
data | data pointer

### gtk_plot_add_function ()

    GtkPlotData * gtk_plot_add_function (GtkPlot *plot,
                                         GtkPlotFunc function);

plot |
function |

| Home |  |