Commit efa3fdc1 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

Use -10 to 10 for all default ranges. Much better than PI, that was


Sat Nov 03 20:51:37 2007  Jiri (George) Lebl <jirka@5z.com>

	* src/graphing.c: Use -10 to 10 for all default ranges.  Much better
	  than PI, that was stupid.  Set minimum plot window to 1e-10 and
	  enforce it to avoid errors with computing ticks leading to
	  hanging behaviour.

	* gtkextra/*: copy new files from cvs version of gtk extra except
	  for gtkpslot which is broken, so keep our old version which works

	* gtkextra/gtkplot3d.[ch]: fix up the axis mess

	* src/graphing.c: use the new gtk extra stuff.  Produces nicer
	  plots on screen.  Initial patch was by Sebastian Dröge
	  <slomo@circular-chaos.org>


svn path=/trunk/; revision=591
parent 68f5c9bc
Sat Nov 03 20:51:37 2007 Jiri (George) Lebl <jirka@5z.com>
* src/graphing.c: Use -10 to 10 for all default ranges. Much better
than PI, that was stupid. Set minimum plot window to 1e-10 and
enforce it to avoid errors with computing ticks leading to
hanging behaviour.
* gtkextra/*: copy new files from cvs version of gtk extra except
for gtkpslot which is broken, so keep our old version which works
* gtkextra/gtkplot3d.[ch]: fix up the axis mess
* src/graphing.c: use the new gtk extra stuff. Produces nicer
plots on screen. Initial patch was by Sebastian Dröge
<slomo@circular-chaos.org>
2007-11-03 Sebastian Dröge <slomo@circular-chaos.org>
* configure.in:
......
* Logfiles and/or save session
* Fit dependent axis for parametric plots (currently misbehaves)
* Whack the readline nonsense in the GUI
* Check this strange thing of locals living on the global context somehow,
try the testprogfamily.gel and look at vars and notice there are things
......
......@@ -40,10 +40,17 @@ public_h_sources = \
gtkpsfont.h \
gtkplot.h \
gtkplot3d.h \
gtkplotarray.h \
gtkplotbar.h \
gtkplotbox.h \
gtkplotcandle.h \
gtkplotcanvas.h \
gtkplotcanvasellipse.h \
gtkplotcanvasline.h \
gtkplotcanvaspixmap.h \
gtkplotcanvasplot.h \
gtkplotcanvasrectangle.h \
gtkplotcanvastext.h \
gtkplotcsurface.h \
gtkplotdata.h \
gtkplotdt.h \
......@@ -66,10 +73,17 @@ libgtkextra_genius_a_SOURCES = \
gtkpsfont.c \
gtkplot.c \
gtkplot3d.c \
gtkplotarray.c \
gtkplotbar.c \
gtkplotbox.c \
gtkplotcandle.c \
gtkplotcanvas.c \
gtkplotcanvasellipse.c \
gtkplotcanvasline.c \
gtkplotcanvaspixmap.c \
gtkplotcanvasplot.c \
gtkplotcanvasrectangle.c \
gtkplotcanvastext.c \
gtkplotcsurface.c \
gtkplotdata.c \
gtkplotdt.c \
......
......@@ -28,7 +28,7 @@
/* #include <gtkextra/gtkcharsel.h> */
/* #include <gtkextra/gtkcheckitem.h> */
/* #include <gtkextra/gtkcolorcombo.h> */
/* #include <gtkextra/gtkcombobox.h> */
/* #include <gtkextra/gtkcombobutton.h> */
/* #include <gtkextra/gtkdirtree.h> */
/* #include <gtkextra/gtkextrafeatures.h> */
/* #include <gtkextra/gtkfilelist.h> */
......@@ -39,14 +39,23 @@
#include <gtkextra/gtkplot.h>
#include <gtkextra/gtkplotpolar.h>
#include <gtkextra/gtkplot3d.h>
/* #include <gtkextra/gtkplotbubble.h> */
#include <gtkextra/gtkplotdata.h>
#include <gtkextra/gtkplotarray.h>
#include <gtkextra/gtkplotsurface.h>
#include <gtkextra/gtkplotcsurface.h>
#include <gtkextra/gtkplotcanvas.h>
#include <gtkextra/gtkplotcanvasellipse.h>
#include <gtkextra/gtkplotcanvasline.h>
#include <gtkextra/gtkplotcanvaspixmap.h>
#include <gtkextra/gtkplotcanvasplot.h>
#include <gtkextra/gtkplotcanvasrectangle.h>
#include <gtkextra/gtkplotcanvastext.h>
#include <gtkextra/gtkplotbar.h>
#include <gtkextra/gtkplotbox.h>
#include <gtkextra/gtkplotdt.h>
#include <gtkextra/gtkplotflux.h>
/* #include <gtkextra/gtkplotsegment.h> */
#include <gtkextra/gtkplotpixmap.h>
#include <gtkextra/gtkplotgdk.h>
#include <gtkextra/gtkplotpc.h>
......@@ -56,5 +65,4 @@
/* #include <gtkextra/gtksheet.h> */
/* #include <gtkextra/gtktogglecombo.h> */
#endif /* GTK_EXTRA_H */
......@@ -19,7 +19,6 @@ gtk_plot_scale_get_type (void)
}
return etype;
}
GType
gtk_plot_symbol_type_get_type (void)
{
......@@ -45,7 +44,6 @@ gtk_plot_symbol_type_get_type (void)
}
return etype;
}
GType
gtk_plot_symbol_style_get_type (void)
{
......@@ -61,7 +59,6 @@ gtk_plot_symbol_style_get_type (void)
}
return etype;
}
GType
gtk_plot_border_style_get_type (void)
{
......@@ -77,7 +74,6 @@ gtk_plot_border_style_get_type (void)
}
return etype;
}
GType
gtk_plot_line_style_get_type (void)
{
......@@ -97,7 +93,6 @@ gtk_plot_line_style_get_type (void)
}
return etype;
}
GType
gtk_plot_connector_get_type (void)
{
......@@ -116,7 +111,6 @@ gtk_plot_connector_get_type (void)
}
return etype;
}
GType
gtk_plot_label_pos_get_type (void)
{
......@@ -132,7 +126,6 @@ gtk_plot_label_pos_get_type (void)
}
return etype;
}
GType
gtk_plot_error_get_type (void)
{
......@@ -147,7 +140,6 @@ gtk_plot_error_get_type (void)
}
return etype;
}
GType
gtk_plot_orientation_get_type (void)
{
......@@ -163,7 +155,6 @@ gtk_plot_orientation_get_type (void)
}
return etype;
}
GType
gtk_plot_axis_pos_get_type (void)
{
......@@ -180,7 +171,6 @@ gtk_plot_axis_pos_get_type (void)
}
return etype;
}
GType
gtk_plot_label_style_get_type (void)
{
......@@ -196,7 +186,6 @@ gtk_plot_label_style_get_type (void)
}
return etype;
}
GType
gtk_plot_ticks_pos_get_type (void)
{
......@@ -213,7 +202,6 @@ gtk_plot_ticks_pos_get_type (void)
return etype;
}
/* enumerations from "gtkplot3d.h" */
GType
gtk_plot_plane_get_type (void)
......@@ -233,7 +221,6 @@ gtk_plot_plane_get_type (void)
}
return etype;
}
GType
gtk_plot_side_get_type (void)
{
......@@ -253,7 +240,6 @@ gtk_plot_side_get_type (void)
return etype;
}
/* enumerations from "gtkplotbar.h" */
GType
gtk_plot_bar_units_get_type (void)
......@@ -271,7 +257,6 @@ gtk_plot_bar_units_get_type (void)
return etype;
}
/* enumerations from "gtkplotcanvas.h" */
GType
gtk_plot_canvas_action_get_type (void)
......@@ -289,7 +274,6 @@ gtk_plot_canvas_action_get_type (void)
}
return etype;
}
GType
gtk_plot_canvas_flag_get_type (void)
{
......@@ -298,31 +282,13 @@ gtk_plot_canvas_flag_get_type (void)
static const GFlagsValue values[] = {
{ GTK_PLOT_CANVAS_FROZEN, "GTK_PLOT_CANVAS_FROZEN", "frozen" },
{ GTK_PLOT_CANVAS_CAN_MOVE, "GTK_PLOT_CANVAS_CAN_MOVE", "can-move" },
{ GTK_PLOT_CANVAS_CAN_X_RESIZE, "GTK_PLOT_CANVAS_CAN_X_RESIZE", "can-x-resize" },
{ GTK_PLOT_CANVAS_CAN_Y_RESIZE, "GTK_PLOT_CANVAS_CAN_Y_RESIZE", "can-y-resize" },
{ GTK_PLOT_CANVAS_CAN_RESIZE, "GTK_PLOT_CANVAS_CAN_RESIZE", "can-resize" },
{ 0, NULL, NULL }
};
etype = g_flags_register_static ("GtkPlotCanvasFlag", values);
}
return etype;
}
GType
gtk_plot_canvas_arrow_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GFlagsValue values[] = {
{ GTK_PLOT_ARROW_NONE, "GTK_PLOT_ARROW_NONE", "none" },
{ GTK_PLOT_ARROW_ORIGIN, "GTK_PLOT_ARROW_ORIGIN", "origin" },
{ GTK_PLOT_ARROW_END, "GTK_PLOT_ARROW_END", "end" },
{ 0, NULL, NULL }
};
etype = g_flags_register_static ("GtkPlotCanvasArrow", values);
}
return etype;
}
GType
gtk_plot_canvas_selection_get_type (void)
{
......@@ -338,7 +304,6 @@ gtk_plot_canvas_selection_get_type (void)
}
return etype;
}
GType
gtk_plot_canvas_selection_mode_get_type (void)
{
......@@ -353,34 +318,6 @@ gtk_plot_canvas_selection_mode_get_type (void)
}
return etype;
}
GType
gtk_plot_canvas_type_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
{ GTK_PLOT_CANVAS_NONE, "GTK_PLOT_CANVAS_NONE", "none" },
{ GTK_PLOT_CANVAS_PLOT, "GTK_PLOT_CANVAS_PLOT", "plot" },
{ GTK_PLOT_CANVAS_AXIS, "GTK_PLOT_CANVAS_AXIS", "axis" },
{ GTK_PLOT_CANVAS_LEGENDS, "GTK_PLOT_CANVAS_LEGENDS", "legends" },
{ GTK_PLOT_CANVAS_TITLE, "GTK_PLOT_CANVAS_TITLE", "title" },
{ GTK_PLOT_CANVAS_TEXT, "GTK_PLOT_CANVAS_TEXT", "text" },
{ GTK_PLOT_CANVAS_DATA, "GTK_PLOT_CANVAS_DATA", "data" },
{ GTK_PLOT_CANVAS_LINE, "GTK_PLOT_CANVAS_LINE", "line" },
{ GTK_PLOT_CANVAS_RECTANGLE, "GTK_PLOT_CANVAS_RECTANGLE", "rectangle" },
{ GTK_PLOT_CANVAS_ELLIPSE, "GTK_PLOT_CANVAS_ELLIPSE", "ellipse" },
{ GTK_PLOT_CANVAS_PIXMAP, "GTK_PLOT_CANVAS_PIXMAP", "pixmap" },
{ GTK_PLOT_CANVAS_MARKER, "GTK_PLOT_CANVAS_MARKER", "marker" },
{ GTK_PLOT_CANVAS_POLYGON, "GTK_PLOT_CANVAS_POLYGON", "polygon" },
{ GTK_PLOT_CANVAS_CUSTOM, "GTK_PLOT_CANVAS_CUSTOM", "custom" },
{ 0, NULL, NULL }
};
etype = g_enum_register_static ("GtkPlotCanvasType", values);
}
return etype;
}
GType
gtk_plot_canvas_pos_get_type (void)
{
......@@ -404,6 +341,44 @@ gtk_plot_canvas_pos_get_type (void)
return etype;
}
/* enumerations from "gtkplotcanvasline.h" */
GType
gtk_plot_canvas_arrow_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GFlagsValue values[] = {
{ GTK_PLOT_CANVAS_ARROW_NONE, "GTK_PLOT_CANVAS_ARROW_NONE", "none" },
{ GTK_PLOT_CANVAS_ARROW_ORIGIN, "GTK_PLOT_CANVAS_ARROW_ORIGIN", "origin" },
{ GTK_PLOT_CANVAS_ARROW_END, "GTK_PLOT_CANVAS_ARROW_END", "end" },
{ 0, NULL, NULL }
};
etype = g_flags_register_static ("GtkPlotCanvasArrow", values);
}
return etype;
}
/* enumerations from "gtkplotcanvasplot.h" */
GType
gtk_plot_canvas_plot_pos_get_type (void)
{
static GType etype = 0;
if (etype == 0) {
static const GEnumValue values[] = {
{ GTK_PLOT_CANVAS_PLOT_OUT, "GTK_PLOT_CANVAS_PLOT_OUT", "out" },
{ GTK_PLOT_CANVAS_PLOT_IN_PLOT, "GTK_PLOT_CANVAS_PLOT_IN_PLOT", "in-plot" },
{ GTK_PLOT_CANVAS_PLOT_IN_LEGENDS, "GTK_PLOT_CANVAS_PLOT_IN_LEGENDS", "in-legends" },
{ GTK_PLOT_CANVAS_PLOT_IN_TITLE, "GTK_PLOT_CANVAS_PLOT_IN_TITLE", "in-title" },
{ GTK_PLOT_CANVAS_PLOT_IN_AXIS, "GTK_PLOT_CANVAS_PLOT_IN_AXIS", "in-axis" },
{ GTK_PLOT_CANVAS_PLOT_IN_DATA, "GTK_PLOT_CANVAS_PLOT_IN_DATA", "in-data" },
{ GTK_PLOT_CANVAS_PLOT_IN_GRADIENT, "GTK_PLOT_CANVAS_PLOT_IN_GRADIENT", "in-gradient" },
{ GTK_PLOT_CANVAS_PLOT_IN_MARKER, "GTK_PLOT_CANVAS_PLOT_IN_MARKER", "in-marker" },
{ 0, NULL, NULL }
};
etype = g_enum_register_static ("GtkPlotCanvasPlotPos", values);
}
return etype;
}
/* enumerations from "gtkplotcsurface.h" */
GType
......@@ -422,7 +397,6 @@ gtk_plot_projection_get_type (void)
return etype;
}
/* enumerations from "gtkplotpc.h" */
GType
gtk_plot_page_size_get_type (void)
......@@ -441,7 +415,6 @@ gtk_plot_page_size_get_type (void)
}
return etype;
}
GType
gtk_plot_page_orientation_get_type (void)
{
......@@ -456,7 +429,6 @@ gtk_plot_page_orientation_get_type (void)
}
return etype;
}
GType
gtk_plot_units_get_type (void)
{
......@@ -474,6 +446,5 @@ gtk_plot_units_get_type (void)
return etype;
}
/* Generated data ends here */
......@@ -7,97 +7,75 @@
#include <glib-object.h>
G_BEGIN_DECLS
/* enumerations from "gtkiconlist.h" */
GType gtk_icon_list_mode_get_type (void);
#define GTK_TYPE_ICON_LIST_MODE (gtk_icon_list_mode_get_type())
/* enumerations from "gtkplot.h" */
GType gtk_plot_scale_get_type (void);
#define GTK_TYPE_PLOT_SCALE (gtk_plot_scale_get_type())
GType gtk_plot_symbol_type_get_type (void);
#define GTK_TYPE_PLOT_SYMBOL_TYPE (gtk_plot_symbol_type_get_type())
GType gtk_plot_symbol_style_get_type (void);
#define GTK_TYPE_PLOT_SYMBOL_STYLE (gtk_plot_symbol_style_get_type())
GType gtk_plot_border_style_get_type (void);
#define GTK_TYPE_PLOT_BORDER_STYLE (gtk_plot_border_style_get_type())
GType gtk_plot_line_style_get_type (void);
#define GTK_TYPE_PLOT_LINE_STYLE (gtk_plot_line_style_get_type())
GType gtk_plot_connector_get_type (void);
#define GTK_TYPE_PLOT_CONNECTOR (gtk_plot_connector_get_type())
GType gtk_plot_label_pos_get_type (void);
#define GTK_TYPE_PLOT_LABEL_POS (gtk_plot_label_pos_get_type())
GType gtk_plot_error_get_type (void);
#define GTK_TYPE_PLOT_ERROR (gtk_plot_error_get_type())
GType gtk_plot_orientation_get_type (void);
#define GTK_TYPE_PLOT_ORIENTATION (gtk_plot_orientation_get_type())
GType gtk_plot_axis_pos_get_type (void);
#define GTK_TYPE_PLOT_AXIS_POS (gtk_plot_axis_pos_get_type())
GType gtk_plot_label_style_get_type (void);
#define GTK_TYPE_PLOT_LABEL_STYLE (gtk_plot_label_style_get_type())
GType gtk_plot_ticks_pos_get_type (void);
#define GTK_TYPE_PLOT_TICKS_POS (gtk_plot_ticks_pos_get_type())
/* enumerations from "gtkplot3d.h" */
GType gtk_plot_plane_get_type (void);
#define GTK_TYPE_PLOT_PLANE (gtk_plot_plane_get_type())
GType gtk_plot_side_get_type (void);
#define GTK_TYPE_PLOT_SIDE (gtk_plot_side_get_type())
/* enumerations from "gtkplotbar.h" */
GType gtk_plot_bar_units_get_type (void);
#define GTK_TYPE_PLOT_BAR_UNITS (gtk_plot_bar_units_get_type())
/* enumerations from "gtkplotcsurface.h" */
GType gtk_plot_projection_get_type (void);
#define GTK_TYPE_PLOT_PROJECTION (gtk_plot_projection_get_type())
/* enumerations from "gtkplotcanvas.h" */
GType gtk_plot_canvas_action_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_ACTION (gtk_plot_canvas_action_get_type())
GType gtk_plot_canvas_flag_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_FLAG (gtk_plot_canvas_flag_get_type())
GType gtk_plot_canvas_arrow_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_ARROW (gtk_plot_canvas_arrow_get_type())
GType gtk_plot_canvas_selection_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_SELECTION (gtk_plot_canvas_selection_get_type())
GType gtk_plot_canvas_selection_mode_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_SELECTION_MODE (gtk_plot_canvas_selection_mode_get_type())
GType gtk_plot_canvas_type_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_TYPE (gtk_plot_canvas_type_get_type())
GType gtk_plot_canvas_pos_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_POS (gtk_plot_canvas_pos_get_type())
/* enumerations from "gtkplotcsurface.h" */
GType gtk_plot_projection_get_type (void);
#define GTK_TYPE_PLOT_PROJECTION (gtk_plot_projection_get_type())
/* enumerations from "gtkplotpc.h" */
GType gtk_plot_page_size_get_type (void);
#define GTK_TYPE_PLOT_PAGE_SIZE (gtk_plot_page_size_get_type())
GType gtk_plot_page_orientation_get_type (void);
#define GTK_TYPE_PLOT_PAGE_ORIENTATION (gtk_plot_page_orientation_get_type())
GType gtk_plot_units_get_type (void);
#define GTK_TYPE_PLOT_UNITS (gtk_plot_units_get_type())
/* enumerations from "gtkplotsegment.h" */
GType gtk_plot_arrow_get_type (void);
#define GTK_TYPE_PLOT_ARROW (gtk_plot_arrow_get_type())
/* enumerations from "gtksheet.h" */
GType gtk_sheet_attr_type_get_type (void);
#define GTK_TYPE_SHEET_ATTR_TYPE (gtk_sheet_attr_type_get_type())
/* enumerations from "gtkplotcanvasline.h" */
GType gtk_plot_canvas_arrow_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_ARROW (gtk_plot_canvas_arrow_get_type())
/* enumerations from "gtkplotcanvasplot.h" */
GType gtk_plot_canvas_plot_pos_get_type (void);
#define GTK_TYPE_PLOT_CANVAS_PLOT_POS (gtk_plot_canvas_plot_pos_get_type())
G_END_DECLS
#endif /* __GTKEXTRA_TYPE_BUILTINS_H__ */
......
This diff is collapsed.
......@@ -24,6 +24,7 @@ extern "C" {
#endif /* __cplusplus */
#include "gtkplotpc.h"
#include "gtkplotarray.h"
#define GTK_PLOT(obj) GTK_CHECK_CAST (obj, gtk_plot_get_type (), GtkPlot)
......@@ -264,10 +265,10 @@ struct _GtkPlotTicks
gint nmajorticks; /* Number of major ticks drawn */
gint nminorticks; /* Number of minor ticks drawn */
gint nticks; /* total number of ticks */
gint nticks; /* total number of ticks */
gdouble step; /* major ticks step */
gint nminor; /* number of minor ticks between major ticks */
gdouble step; /* major ticks step */
gint nminor; /* number of minor ticks between major ticks */
gboolean apply_break;
GtkPlotScale break_scale;
......@@ -280,7 +281,7 @@ struct _GtkPlotTicks
GtkPlotTick *values;
gboolean set_limits;
gdouble begin, end;
gdouble begin, end;
};
struct _GtkPlotAxis
......@@ -299,8 +300,6 @@ struct _GtkPlotAxis
GtkPlotOrientation orientation;
GtkPlotScale scale;
GtkPlotLine line;
GtkPlotLine major_grid;
GtkPlotLine minor_grid;
......@@ -325,6 +324,20 @@ struct _GtkPlotAxis
gint label_precision;
gint label_style;
gint label_mask;
GtkPlotArray *tick_labels;
void (*ticks_recalc) (GtkPlotAxis *axis);
void (*ticks_autoscale) (GtkPlotAxis *axis,
gdouble xmin, gdouble xmax,
gint *precision);
gdouble (*ticks_transform) (GtkPlotAxis *axis, gdouble y);
gdouble (*ticks_inverse) (GtkPlotAxis *axis, gdouble y);
void (*parse_label) (GtkPlotAxis *axis,
gdouble val,
gint precision,
gint style,
gchar *label);
};
struct _GtkPlotData
......@@ -367,18 +380,7 @@ struct _GtkPlotData
gint num_points;
gdouble *x;
gdouble *y;
gdouble *z;
gdouble *a;
gdouble *dx;
gdouble *dy;
gdouble *dz;
gdouble *da;
gdouble a_scale;
gchar **labels;
GtkPlotArrayList *data;
gint labels_offset;
GtkPlotText labels_attr;
......@@ -394,7 +396,7 @@ struct _GtkPlotData
GdkColor color_min, color_max;
GdkColor color_lt_min, color_gt_max;
gint gradient_mask;
GtkPlotTicks gradient;
GtkPlotAxis * gradient;
gboolean gradient_custom;
GdkColor *gradient_colors;
......@@ -408,6 +410,16 @@ struct _GtkPlotData
gboolean show_markers;
gboolean redraw_pending;
GtkPlotAxisPos gradient_title_pos;
gint gradient_line_width;
gint gradient_line_height;
gdouble gradient_x, gradient_y;
GtkPlotBorderStyle gradient_border;
gint gradient_border_offset;
gint gradient_border_width;
gint gradient_shadow_width;
};
struct _GtkPlot
......@@ -484,10 +496,10 @@ struct _GtkPlotClass
void (* changed) (GtkPlot *plot);
gboolean (* moved) (GtkPlot *plot,
gdouble x, gdouble y);
gdouble *x, gdouble *y);
gboolean (* resized) (GtkPlot *plot,
gdouble width, gdouble height);
gdouble *width, gdouble *height);
void (* plot_paint) (GtkWidget *plot);
......@@ -512,8 +524,8 @@ struct _GtkPlotDataClass
gboolean (* add_to_plot) (GtkPlotData *data, GtkPlot *plot);
void (* update) (GtkPlotData *data, gboolean new_range);
void (* gradient_changed) (GtkPlotData *data);
void (* gradient_colors_changed) (GtkPlotData *data);
void (* gradient_changed) (GtkPlotData *data);
void (* gradient_colors_changed) (GtkPlotData *data);
void (* draw_data) (GtkPlotData *data);
void (* draw_symbol) (GtkPlotData *data,
gdouble x,
......@@ -527,8 +539,11 @@ struct _GtkPlotDataClass
void (* draw_legend) (GtkPlotData *data, gint x, gint y);
void (* get_legend_size) (GtkPlotData *data,
gint *width, gint *height);
void (* draw_gradient) (GtkPlotData *data);
void (* get_gradient_size) (GtkPlotData *data,
gint *width, gint *height);
void (* clone) (GtkPlotData *data, GtkPlotData *copy);
void (* clone) (GtkPlotData *data, GtkPlotData *copy);
/*
void (* error) (GtkPlotData *data, gint errno);
*/
......@@ -541,6 +556,7 @@ struct _GtkPlotAxisClass
gboolean (* tick_label) (GtkPlotAxis *axis,
gdouble *tick,
gchar *label);
gboolean (* changed) (GtkPlotAxis *axis);
};
......@@ -662,6 +678,26 @@ void gtk_plot_draw_line (GtkPlot *plot,
gdouble x2, gdouble y2);
void gtk_plot_draw_text (GtkPlot *plot,
GtkPlotText text);
void gtk_plot_set_ticks (GtkPlot *plot,
GtkPlotOrientation orientation, gdouble major_step,
gint nminor);
void gtk_plot_set_major_ticks (GtkPlot *plot,
GtkPlotOrientation orientation, gdouble major_step);
void gtk_plot_set_minor_ticks (GtkPlot *plot,
GtkPlotOrientation orientation, gint nminor);
void gtk_plot_set_ticks_limits (GtkPlot *plot,
GtkPlotOrientation orientation, gdouble begin, gdouble end);
void gtk_plot_unset_ticks_limits(GtkPlot *plot,
GtkPlotOrientation orientation);
void gtk_plot_set_break (GtkPlot *plot,
GtkPlotOrientation orient,
gdouble min, gdouble max,
gdouble step_after,
gint nminor_after,
GtkPlotScale scale_after,
gdouble pos);
void gtk_plot_remove_break (GtkPlot *plot,
GtkPlotOrientation orient);
/* Axis */
......@@ -671,112 +707,100 @@ 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,
void gtk_plot_axis_set_visible (GtkPlotAxis *axis,
gboolean visible);
gboolean gtk_plot_axis_visible (GtkPlot *plot,
GtkPlotAxisPos axis);
void gtk_plot_axis_set_title (GtkPlot *plot,
GtkPlotAxisPos axis,
gboolean gtk_plot_axis_visible (GtkPlotAxis *axis);
void gtk_plot_axis_set_title (GtkPlotAxis *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,
void gtk_plot_axis_show_title (GtkPlotAxis *axis);
void gtk_plot_axis_hide_title (GtkPlotAxis *axis);
void gtk_plot_axis_move_title (GtkPlotAxis *axis,
gint angle,
gdouble x, gdouble y);
void gtk_plot_axis_justify_title (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_justify_title (GtkPlotAxis *axis,
GtkJustification justification);
void gtk_plot_axis_set_attributes (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_set_attributes (GtkPlotAxis *axis,
gfloat width,
const GdkColor *color);
void gtk_plot_axis_get_attributes (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_get_attributes (GtkPlotAxis *axis,
gfloat *width,
GdkColor *color);
void gtk_plot_axis_set_ticks (GtkPlot *plot,
GtkPlotOrientation orientation,
void gtk_plot_axis_set_ticks (GtkPlotAxis *axis,
gdouble major_step,
gint nminor);
void gtk_plot_axis_set_major_ticks (GtkPlot *plot,
GtkPlotOrientation orientation,
void gtk_plot_axis_set_major_ticks (GtkPlotAxis *axis,
gdouble major_step);
void gtk_plot_axis_set_minor_ticks (GtkPlot *plot,
GtkPlotOrientation orientation,
void gtk_plot_axis_set_minor_ticks (GtkPlotAxis *axis,
gint nminor);
void gtk_plot_axis_set_ticks_length (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_set_ticks_length (GtkPlotAxis *axis,
gint length);
void gtk_plot_axis_set_ticks_width (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_set_ticks_width (GtkPlotAxis *axis,
gfloat width);
void gtk_plot_axis_show_ticks (GtkPlot *plot,
GtkPlotAxisPos axis,
void gtk_plot_axis_show_ticks (GtkPlotAxis *axis,
gint major_mask,
gint minor_mask);
void gtk_plot_axis_set_ticks_limits (GtkPlot *plot,
GtkPlotOrientation orientation,
void gtk_plot_axis_set_ticks_limits (GtkPlotAxis *axis,
gdouble begin, gdouble end);
void gtk_plot_axis_unset_ticks_limits(GtkPlot *plot,
GtkPlotOrientation orientation);
void gtk_plot_axis_set_break (GtkPlot *plot,
GtkPlotOrientation orient,
gdouble min, gdouble max,
gdouble step_after,
gint nminor_after,
void gtk_plot_axis_unset_ticks_limits(GtkPlotAxis *axis);
void gtk_plot_axis_set_tick_labels (GtkPlotAxis *axis,
GtkPlotArray *array);
void gtk_plot_axis_set_break (GtkPlotAxis *axis,
gdouble min, gdouble max,
gdouble step_after,
gint nminor_after,