| Top |
| char * | axis-label-bottom | Read / Write |
| char * | axis-label-left | Read / Write |
| char * | axis-label-right | Read / Write |
| char * | axis-label-top | Read / Write |
| GwyGraphGridType | grid-type | Read / Write |
| int | label-frame-thickness | Read / Write |
| gboolean | label-has-frame | Read / Write |
| GwyGraphKeyPosition | label-position | Read / Write |
| double | label-relative-x | Read / Write |
| double | label-relative-y | Read / Write |
| gboolean | label-reverse | Read / Write |
| gboolean | label-visible | Read / Write |
| guint | n-curves | Read |
| GwySIUnit * | si-unit-x | Read / Write |
| GwySIUnit * | si-unit-y | Read / Write |
| char * | title | Read / Write |
| gboolean | x-logarithmic | Read / Write |
| double | x-max | Read / Write |
| gboolean | x-max-set | Read / Write |
| double | x-min | Read / Write |
| gboolean | x-min-set | Read / Write |
| gboolean | y-logarithmic | Read / Write |
| double | y-max | Read / Write |
| gboolean | y-max-set | Read / Write |
| double | y-min | Read / Write |
| gboolean | y-min-set | Read / Write |
| enum | GwyGraphGridType |
| enum | GwyGraphModelExportStyle |
| struct | GwyGraphModel |
| struct | GwyGraphModelClass |
GwyGraphModel *
gwy_graph_model_new_alike (GwyGraphModel *gmodel);
Creates new graph model object that has the same settings as gmodel
.
This includes axis/label visibility, actual plotting range, etc. Curves are not duplicated or referenced.
GwyGraphModel *
gwy_graph_model_copy (GwyGraphModel *gmodel);
Create a new graph curve model as a copy of an existing one.
This function is a convenience gwy_serializable_copy() wrapper.
void gwy_graph_model_assign (GwyGraphModel *destination,GwyGraphModel *source);
Makes one data gmodel equal to another.
This function is a convenience gwy_serializable_assign() wrapper.
gint
gwy_graph_model_get_n_curves (GwyGraphModel *gmodel);
Reports the number of curves in a graph model.
gint gwy_graph_model_add_curve (GwyGraphModel *gmodel,GwyGraphCurveModel *curve);
Adds a new curve to a graph model.
gint gwy_graph_model_remove_curve_by_description (GwyGraphModel *gmodel,const gchar *description);
Removes all the curves having same description string as description
.
void gwy_graph_model_remove_curve (GwyGraphModel *gmodel,gint cindex);
Removes the curve having given index.
GwyGraphCurveModel * gwy_graph_model_get_curve_by_description (GwyGraphModel *gmodel,const gchar *description);
Finds a graph curve model in a graph model by its description.
GwyGraphCurveModel * gwy_graph_model_get_curve (GwyGraphModel *gmodel,gint cindex);
Gets a graph curve model in a graph model by its index.
gint gwy_graph_model_get_curve_index (GwyGraphModel *gmodel,GwyGraphCurveModel *curve);
Finds the index of a graph model curve.
void gwy_graph_model_replace_curve (GwyGraphModel *gmodel,gint cindex,GwyGraphCurveModel *curve);
Replaces a curve in a graph model.
void
gwy_graph_model_remove_all_curves (GwyGraphModel *gmodel);
Removes all the curves from graph model
void gwy_graph_model_append_curves (GwyGraphModel *gmodel,GwyGraphModel *source,gint colorstep);
Appends all curves from another graph model to a graph model.
The colors of the curves can be updated, presumably to continue a preset color sequence. This is controlled by
argument colorstep
. When colorstep
is zero no curve color modification is done. When it is positive, a block of
curves of size colorstep
is always given the same color, the first color being the first preset color
corresponding to the number of curves already in gmodel
. So pass colorstep
=1 for individual curves, colorstep
=2
for couples of curves (e.g. data and fit) that should have the same color, etc.
GwySIUnit *
gwy_graph_model_get_si_unit_x (GwyGraphModel *gmodel);
Returns ordinate SI unit of a graph model.
The returned object can be modified to change the graph ordinate units.
GwySIUnit *
gwy_graph_model_get_si_unit_y (GwyGraphModel *gmodel);
Returns abscissa SI unit of a graph model.
The returned object can be modified to change the graph abscissa units.
void gwy_graph_model_set_units_from_data_line (GwyGraphModel *gmodel,GwyDataLine *data_line);
Sets x and y graph model units to match a data line.
void gwy_graph_model_set_units_from_data_field (GwyGraphModel *gmodel,GwyDataField *data_field,gint power_xy_in_x,gint power_z_in_x,gint power_xy_in_y,gint power_z_in_y);
Sets x and y graph model units to units derived from a data field.
gmodel |
A graph model. |
|
data_field |
A data field. |
|
power_xy_in_x |
Power of field's lateral units to appear in graph's abscissa units. |
|
power_z_in_x |
Power of field's value units to appear in graph's abscissa units. |
|
power_xy_in_y |
Power of field's lateral units to appear in graph's ordinate units. |
|
power_z_in_y |
Power of field's value units to appear in graph's ordinate units. |
gboolean gwy_graph_model_units_are_compatible (GwyGraphModel *gmodel,GwyGraphModel *othergmodel);
Checks if the units of two graph models are compatible.
This function is useful namely as a pre-check for moving curves between graphs.
gboolean
gwy_graph_model_x_data_can_be_logarithmed
(GwyGraphModel *gmodel);
Checks whehter x axis can be lograrithmed.
gboolean
gwy_graph_model_y_data_can_be_logarithmed
(GwyGraphModel *gmodel);
Checks whehter y axis can be lograrithmed.
void gwy_graph_model_set_axis_label (GwyGraphModel *gmodel,GtkPositionType pos,const gchar *label);
Sets one axis label of a graph model.
const gchar * gwy_graph_model_get_axis_label (GwyGraphModel *gmodel,GtkPositionType pos);
Gets the label of a one graph model axis.
const gchar *
gwy_graph_model_get_title (GwyGraphModel *gmodel);
Gets the graph model title.
gboolean gwy_graph_model_get_x_range (GwyGraphModel *gmodel,gdouble *x_min,gdouble *x_max);
Gets the abscissa range of a graph.
Explicitly set minimum and maximum range properties take precedence over values calculated from curve abscissa ranges.
gboolean gwy_graph_model_get_y_range (GwyGraphModel *gmodel,gdouble *y_min,gdouble *y_max);
Gets the ordinate range of a graph.
Explicitly set minimum and maximum range properties take precedence over values calculated from curve ordinate ranges.
gboolean gwy_graph_model_get_ranges (GwyGraphModel *gmodel,gboolean x_logscale,gboolean y_logscale,gdouble *x_min,gdouble *x_max,gdouble *y_min,gdouble *y_max);
Gets the log-scale suitable range minima of a graph curve.
See gwy_graph_curve_model_get_ranges() for discussion.
gmodel |
A graph model. |
|
x_logscale |
|
|
y_logscale |
|
|
x_min |
Location to store the minimum abscissa value, or |
|
x_max |
Location to store the maximum abscissa value, or |
|
y_min |
Location to store the minimum ordinate value, or |
|
y_max |
Location to store the maximum ordinate value, or |
GString * gwy_graph_model_export_ascii (GwyGraphModel *model,gboolean export_units,gboolean export_labels,gboolean export_metadata,GwyGraphModelExportStyle export_style,GString *string);
Exports a graph model data to a string.
The export format is specified by parameter export_style
.
model |
A graph model. |
|
export_units |
|
|
export_labels |
|
|
export_metadata |
|
|
export_style |
File format subtype to export to (e. g. plain, csv, gnuplot, etc.). |
|
string |
A string to append the text dump to, or |
Graph ASCII export style.
|
White-space separated data values, plain description lines and column headers, missing data represented with dashes. |
||
|
White-space separated data values, curves serialised, description lines and
column headers prefixed with |
||
|
Semicolon separated data values and column headers, missing data represented as empty columns. |
||
|
Presently, the same as the plain format. |
||
|
Text wave format of Igor Pro (.itx). |
||
|
Flag that can be combined with the other formats, meaning locale-independent C/POSIX format of floating point numbers. |
||
|
Flag that can be combined with the other formats (except Igor Pro), requesting multi-column output with a single merged abscissa in the first column. |
struct GwyGraphModelClass {
GObjectClass parent_class;
void (*curve_data_changed)(GwyGraphModel *gmodel,
gint i);
void (*curve_notify)(GwyGraphModel *gmodel,
gint i,
GParamSpec *pspec);
void (*reserved1)(void);
void (*reserved2)(void);
void (*reserved3)(void);
void (*reserved4)(void);
};
“axis-label-bottom” property “axis-label-bottom” char *
The label of the bottom axis.
Owner: GwyGraphModel
Flags: Read / Write
Default value: "x"
“axis-label-left” property “axis-label-left” char *
The label of the left axis.
Owner: GwyGraphModel
Flags: Read / Write
Default value: "y"
“axis-label-right” property “axis-label-right” char *
The label of the right axis.
Owner: GwyGraphModel
Flags: Read / Write
Default value: ""
“axis-label-top” property “axis-label-top” char *
The label of the top axis.
Owner: GwyGraphModel
Flags: Read / Write
Default value: ""
“grid-type” property“grid-type” GwyGraphGridType
Type of grid drawn on main graph area.
Owner: GwyGraphModel
Flags: Read / Write
Default value: GWY_GRAPH_GRID_AUTO
“label-frame-thickness” property “label-frame-thickness” int
Thickness of key label frame.
Owner: GwyGraphModel
Flags: Read / Write
Allowed values: [0,16]
Default value: 1
“label-has-frame” property “label-has-frame” gboolean
TRUE if key label has frame.
Owner: GwyGraphModel
Flags: Read / Write
Default value: TRUE
“label-position” property“label-position” GwyGraphKeyPosition
Position type of key label.
Owner: GwyGraphModel
Flags: Read / Write
Default value: GWY_GRAPH_KEY_NORTHEAST
“label-relative-x” property “label-relative-x” double
Relative screen x-coordinate of label inside the area for user label position.
Owner: GwyGraphModel
Flags: Read / Write
Allowed values: [0,1]
Default value: 1
“label-relative-y” property “label-relative-y” double
Relative screen y-coordinate of label inside the area for user label position.
Owner: GwyGraphModel
Flags: Read / Write
Allowed values: [0,1]
Default value: 0
“label-reverse” property “label-reverse” gboolean
TRUE if text and curve sample is switched in the key.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“label-visible” property “label-visible” gboolean
TRUE if key label is visible.
Owner: GwyGraphModel
Flags: Read / Write
Default value: TRUE
“n-curves” property “n-curves” guint
The number of curves in graph model.
Owner: GwyGraphModel
Flags: Read
Default value: 0
“si-unit-x” property“si-unit-x” GwySIUnit *
The unit of horizontal axis values.
Units are set by value. The unit object does not change. Setting the property is the same as getting the unit
object and using gwy_si_unit_assing() to modify it.
Owner: GwyGraphModel
Flags: Read / Write
“si-unit-y” property“si-unit-y” GwySIUnit *
Unit of y axis. Units are always passed by value, the unit object has a different identity than the object owned by the graph model.
Owner: GwyGraphModel
Flags: Read / Write
“title” property “title” char *
The graph title.
Owner: GwyGraphModel
Flags: Read / Write
Default value: "New graph"
“x-logarithmic” property “x-logarithmic” gboolean
TRUE if x coordinate is logarithimic.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“x-max” property “x-max” double
Requested maximum x value.
Owner: GwyGraphModel
Flags: Read / Write
Default value: 0
“x-max-set” property “x-max-set” gboolean
Whether x-max is set.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“x-min” property “x-min” double
Requested minimum x value.
Owner: GwyGraphModel
Flags: Read / Write
Default value: 0
“x-min-set” property “x-min-set” gboolean
Whether x-min is set.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“y-logarithmic” property “y-logarithmic” gboolean
TRUE if y coordinate is logarithimic.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“y-max” property “y-max” double
Requested maximum y value.
Owner: GwyGraphModel
Flags: Read / Write
Default value: 0
“y-max-set” property “y-max-set” gboolean
Whether y-max is set.
Owner: GwyGraphModel
Flags: Read / Write
Default value: FALSE
“y-min” property “y-min” double
Requested minimum y value.
Owner: GwyGraphModel
Flags: Read / Write
Default value: 0
“curve-data-changed” signalvoid user_function (GwyGraphModel *gwygraphmodel, int arg1, gpointer user_data)
The ::curve-data-changed signal is emitted whenever any of the curves in a graph model emits “data-changed”.
gwygraphmodel |
The GwyGraphModel which received the signal. |
|
arg1 |
The index of the changed curve in the model. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
“curve-notify” signalvoid user_function (GwyGraphModel *gwygraphmodel, int arg1, GParamSpec *arg2, gpointer user_data)
The ::curve-data-changed signal is emitted whenever any of the curves in a graph model emits “notify”.
gwygraphmodel |
The GwyGraphModel which received the signal. |
|
arg1 |
The index of the changed curve in the model. |
|
arg2 |
The GParamSpec of the property that has changed. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First