plotmm-0.1.2/ 0000777 0001750 0001750 00000000000 10334655064 010035 5 0000000 0000000 plotmm-0.1.2/doc/ 0000777 0001750 0001750 00000000000 10334655064 010602 5 0000000 0000000 plotmm-0.1.2/doc/html/ 0000777 0001750 0001750 00000000000 10334654217 011545 5 0000000 0000000 plotmm-0.1.2/doc/html/classes.html 0000644 0001750 0001750 00000012206 10334654215 014003 0000000 0000000
| Paint (PlotMM) | |
Curve (PlotMM) | Plot (PlotMM) | |
| PlotCanvas (PlotMM) | |
DoubleIntMap (PlotMM) | PlotLabel (PlotMM) | |
DoublePoint (PlotMM) |
| |
DoubleRect (PlotMM) | Rectangle (PlotMM) | |
DoubleSize (PlotMM) |
| |
| Scale (PlotMM) | |
ErrorCurve (PlotMM) | ScaleLabels (PlotMM) | |
| Symbol (PlotMM) | |
HScale (PlotMM) |
| |
HScaleLabels (PlotMM) | VScale (PlotMM) | |
| VScaleLabels (PlotMM) |
The ScaleDiv class can build linear and logarithmic scale divisions for specified intervals. It uses an adjustable algorithm to generate the major and minor step widths automatically. A scale division has a minimum value, a maximum value, a vector of major marks, and a vector of minor marks.
#include <plotmm/scalediv.h> #include <iostream.h> main() { int i,k; PlotMM::ScaleDiv sd; sd.rebuild(0.01, 1000, 10, 10, TRUE, 0.0); k=0; for (i=0;i<sd.maj_count();i++) { while(k < sd.min_count()) { if (sd.min_mark(k) < sd.maj_mark(i)) { cout << " - " << sd.min_mark(i) << "\n"; k++; } else break; } cout << "-- " << sd.maj_mark(i) << "\n"; } while(k < sd.min_count()) { cout << " - " << sd.min_mark(i) << "\n"; k++; } }
Public Member Functions | |
ScaleDiv () | |
int | operator== (const ScaleDiv &s) const |
int | operator!= (const ScaleDiv &s) const |
double | low_bound () const |
double | high_bound () const |
uint | min_count () const |
uint | maj_count () const |
bool | log_scale () const |
double | maj_mark (int i) const |
double | min_mark (int i) const |
double | maj_step () const |
void | reset () |
bool | rebuild (double lBound, double hBound, int maxMaj, int maxMin, bool log, double step=0.0, bool ascend=true) |
|
Construct a ScaleDiv instance.
|
|
|
|
|
|
|
|
|
|
Return major mark at position i.
|
|
|
|
|
|
Return minor mark at position i.
|
|
Inequality.
|
|
Equality operator.
|
|
Build a scale width major and minor divisions If no fixed step width is specified or if it is set to 0, the major step width will be calculated automatically according to the the value of maxMajSteps. The maxMajSteps parameter has no effect if a fixed step size is specified. The minor step width is always calculated automatically. If the step width is to be calculated automatically, the algorithm tries to find reasonable values fitting into the scheme {1,2,5}*10^n with an integer number n for linear scales. For logarithmic scales, there are three different cases
|
|
Detach the shared data and set everything to zero.
|
Consider the following example:
/*! Invisible class because of truncation */ class Invisible { }; /*! Truncated class, inheritance relation is hidden */ class Truncated : public Invisible { }; /* Class not documented with doxygen comments */ class Undocumented { }; /*! Class that is inherited using public inheritance */ class PublicBase : public Truncated { }; /*! A template class */ template<class T> class Templ { }; /*! Class that is inherited using protected inheritance */ class ProtectedBase { }; /*! Class that is inherited using private inheritance */ class PrivateBase { }; /*! Class that is used by the Inherited class */ class Used { }; /*! Super class that inherits a number of other classes */ class Inherited : public PublicBase, protected ProtectedBase, private PrivateBase, public Undocumented public Templ<int> { private: Used *m_usedClass; };
MAX_DOT_GRAPH_HEIGHT
tag in the configuration file is set to 240 this will result in the following graph:
The boxes in the above graph have the following meaning:
get_abs_height() const | PlotMM::Rectangle | |
get_abs_width() const | PlotMM::Rectangle | |
get_x_max() const | PlotMM::Rectangle | |
get_x_min() const | PlotMM::Rectangle | |
get_y_max() const | PlotMM::Rectangle | |
get_y_min() const | PlotMM::Rectangle | |
Rectangle() (defined in PlotMM::Rectangle) | PlotMM::Rectangle | |
Rectangle(int x, int y, int width, int height) (defined in PlotMM::Rectangle) | PlotMM::Rectangle | |
set_destination(int x, int y) | PlotMM::Rectangle | |
set_origin(int x, int y) | PlotMM::Rectangle | |
set_points(int x1, int y1, int x2, int y2) | PlotMM::Rectangle | |
set_rect(int x, int y, int width, int height) | PlotMM::Rectangle |
Public Member Functions | |
int | add_curve (const Glib::RefPtr< Curve > &, PlotAxisID xaxis=AXIS_BOTTOM, PlotAxisID yaxis=AXIS_LEFT, bool enable=true) |
void | replot () |
PlotLabel * | title () |
Scale * | scale (PlotAxisID id) |
PlotLabel * | label (PlotAxisID id) |
SigC::Signal3< void, int, int, GdkEventButton * > | signal_plot_mouse_press () |
SigC::Signal3< void, int, int, GdkEventButton * > | signal_plot_mouse_release () |
SigC::Signal3< void, int, int, GdkEventMotion * > | signal_plot_mouse_move () |
void | set_selection (const Rectangle &r) |
Rectangle | get_selection () |
void | enable_selection () |
void | disable_selection () |
Protected Member Functions | |
virtual bool | on_canvas_expose_event (GdkEventExpose *event) |
virtual void | draw_selection_ () |
Protected Attributes | |
Gtk::Table | layout_ |
PlotCanvas | canvas_ |
std::vector< Scale * > | tickMark_ |
std::vector< ScaleLabels * > | tickLabel_ |
std::vector< PlotLabel * > | axisLabel_ |
PlotLabel | title_ |
Classes | |
struct | CurveInfo |
|
Add a new curve to the plot. The plot will not be updated - call replot() manually after adding new curves. |
|
Disable drawing of the selection rectangle. To actually erase the rectangle, replot() must be called. |
|
draws the current selection rectangle on the plot canvas.
|
|
Enable drawing of the selection rectangle. The geometry can be changed using set_selection. To actually draw the rectangle, replot() must be called. |
|
Replot all curves After adding curves to the plot or changing the curves' data with Curve::setData() this method must be called to update the plot. If autoscaling is activated for an axis used by any of the Curve::enabled() curves that axis will be scaled to a new range. |
|
Set the selection to the given rectangle. If selection is enabled, the old rectangle is erased and the new is drawn. Note that replot() does not have to be called explicitly. No other canvas contents but the rectangle are redrawn calling this method. |
|
Return the signal owned by plot canvas.
|
|
Return the signal owned by plot canvas.
|
|
Return the signal owned by plot canvas.
|
Public Member Functions | |
ScaleLabels (Gtk::PositionType p) | |
virtual | ~ScaleLabels () |
Pango::FontDescription * | font () |
void | set_labels (int offs, const std::map< int, double > &labels) |
void | set_enabled (bool b) |
bool | enabled () const |
Glib::ustring | format (double) const |
int | text_width (const Glib::ustring &) const |
int | text_height (const Glib::ustring &) const |
Gtk::PositionType | position () const |
Protected Member Functions | |
virtual void | update_ () |
virtual void | newsize_ () |
virtual void | requestsize_ () |
Protected Attributes | |
int | offset_ |
int | layw_ |
int | layh_ |
int | range_ |
std::map< int, double > | labels_ |
Glib::RefPtr< Pango::Layout > | layout_ |
Pango::FontDescription | font_ |
|
Constructor |
|
Destructor |
|
Return if the labels are enabled.
|
|
Return a pointer to the labels' font.
|
|
Format a string from a double value
|
|
Return where the labels are positioned.
|
|
Enable drawing of scalelabels
|
|
Set the labels to be drawn The given map holds double values associated with int positions on a scale. The given offs can be taken as a hint to calculate the right positions for the labels. Normally, the leftmost or upmost border of the scale's Gdk::Window is taken for this offset.
|
|
Query the pixel height of the given text when rendered with the current font() settings |
|
Query the pixel width of the given text when rendered with the current font() settings |
Symbols are used by Curve to draw individual data points. There are various kinds of symbols that can be used like ellipses, rectangles, triangles (with different orientations) and crosses. Additional symbols can be implemented by overloading draw_vfunc_().
Public Member Functions | |
Symbol (SymbolStyleID st=SYMBOL_NONE, int size=1, int sizeb=-1) | |
virtual | ~Symbol () |
bool | operator!= (const Symbol &) const |
bool | operator== (const Symbol &) const |
void | set_size (int a, int b=-1) |
void | set_style (SymbolStyleID s) |
Glib::RefPtr< Paint > | paint () const |
int | size () const |
int | size_aux () const |
SymbolStyleID | style () const |
void | draw (const Glib::RefPtr< Gdk::Drawable > &p, const Gdk::Point &pt) const |
void | draw (const Glib::RefPtr< Gdk::Drawable > &p, const Gdk::Rectangle &r) const |
void | draw (const Glib::RefPtr< Gdk::Drawable > &p, int x, int y, int w=-1, int h=-1) const |
Protected Member Functions | |
virtual void | draw_vfunc_ (const Glib::RefPtr< Gdk::Drawable > &p, int x, int y, int w, int h) const |
|
Constructor.
|
|
Destructor.
|
|
Draw the symbol at the specified position with optionally specified size.
|
|
Draw the symbol at a point (x,y).
|
|
Draw the symbol at a specified point.
|
|
overload this function to provide additional symbol styles To draw the symbol this function makes use of paint() - the pen is used to draw outlines whilst the brush is used to fill the symbol. |
|
!= operator
|
|
== operator
|
|
Return a reference to the Paint the symbol is drawn with |
|
Specify the symbol's size. In most cases, the vertical size is the same as the horizontal size. It is perfectly sufficient to set the horizontal size. size() and size_aux() will return the same value, then.
|
|
Specify the symbol style. The following styles are defined:
|
|
Return Size.
|
|
Return auxiliary size or, if unset, size().
|
|
Return SymbolStyle.
|
add_curve(const Glib::RefPtr< Curve > &, PlotAxisID xaxis=AXIS_BOTTOM, PlotAxisID yaxis=AXIS_LEFT, bool enable=true) | PlotMM::Plot | |
axisLabel_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
canvas_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
disable_selection() | PlotMM::Plot | |
draw_selection_() | PlotMM::Plot | [protected, virtual] |
enable_selection() | PlotMM::Plot | |
get_selection() (defined in PlotMM::Plot) | PlotMM::Plot | |
label(PlotAxisID id) (defined in PlotMM::Plot) | PlotMM::Plot | |
layout_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
on_canvas_expose_event(GdkEventExpose *event) (defined in PlotMM::Plot) | PlotMM::Plot | [protected, virtual] |
Plot() (defined in PlotMM::Plot) | PlotMM::Plot | |
replot() | PlotMM::Plot | |
scale(PlotAxisID id) (defined in PlotMM::Plot) | PlotMM::Plot | |
set_selection(const Rectangle &r) | PlotMM::Plot | |
signal_plot_mouse_move() | PlotMM::Plot | |
signal_plot_mouse_press() | PlotMM::Plot | |
signal_plot_mouse_release() | PlotMM::Plot | |
tickLabel_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
tickMark_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
title() (defined in PlotMM::Plot) | PlotMM::Plot | |
title_ (defined in PlotMM::Plot) | PlotMM::Plot | [protected] |
~Plot() (defined in PlotMM::Plot) | PlotMM::Plot | [virtual] |
Files | |
file | compat.h |
file | curve.cc |
file | curve.h |
file | doubleintmap.cc |
file | doubleintmap.h |
file | doublerect.cc |
file | doublerect.h |
file | errorcurve.cc |
file | errorcurve.h |
file | paint.cc |
file | paint.h |
file | plot.cc |
file | plot.h |
file | rectangle.h |
file | scale.cc |
file | scale.h |
file | scalediv.cc |
file | scalediv.h |
file | supplemental.cc |
file | supplemental.h |
file | symbol.cc |
file | symbol.h |
If you obtained a cvs-snapshot or checked out the sources from cvs, it is now time to
# bootstrap
Now, type
# ./configure # make
If there were no errors, just type
# examples/simple/simple
# make install
(we might want to have a plotmm.spec file some day)
# doxygen Doxyfile
Public Member Functions | |
Paint (const Paint &c) | |
bool | operator!= (const Paint &) const |
bool | operator== (const Paint &) const |
void | set_pen_color (const Gdk::Color &) |
void | set_brush_color (const Gdk::Color &) |
Glib::RefPtr< Gdk::GC > | pen (const Glib::RefPtr< Gdk::Drawable > &) const |
Glib::RefPtr< Gdk::GC > | brush (const Glib::RefPtr< Gdk::Drawable > &) const |
bool | filled () const |
|
Return Brush (no fill).
|
|
Return Pen (only outline).
|
|
Set the color of the brush The pen is used to fill objects |
|
Set the color of the pen The pen is used to draw lines or outlines of objects |
This inheritance list is sorted roughly, but not completely, alphabetically: