## GogPlot

GogPlot — Base class for plots

## Synopsis

                        GogPlotBoundInfo;
    #define             GOG_PLOT_TYPE
    #define             GOG_PLOT                            (o)
    #define             IS_GOG_PLOT                         (o)
    GType               gog_plot_get_type                   (void);
    GogPlot*            gog_plot_new_by_type                (GogPlotType const *type);
    GogPlot*            gog_plot_new_by_name                (char const *id);
    gboolean            gog_plot_make_similar               (GogPlot *dst,
                                                             GogPlot const *src);
    void                gog_plot_request_cardinality_update (GogPlot *plot);
    void                gog_plot_update_cardinality         (GogPlot *plot,
                                                             int index_num);
    void                gog_plot_get_cardinality            (GogPlot *plot,
                                                             unsigned *full,
                                                             unsigned *visible);
    void                gog_plot_foreach_elem               (GogPlot *plot,
                                                             gboolean only_visible,
                                                             GogEnumFunc handler,
                                                             gpointer data);
    GSListconst *       gog_plot_get_series                 (GogPlot const *plot);
    GOData*             gog_plot_get_axis_bounds            (GogPlot *plot,
                                                             GogAxisType axis,
                                                             GogPlotBoundInfo *bounds);
    gboolean            gog_plot_supports_vary_style_by_element
                                                            (GogPlot const *plot);
    GogSeries*          gog_plot_new_series                 (GogPlot *plot);
    GogPlotDescconst *  gog_plot_description                (GogPlot const *plot);
    GogAxisSet          gog_plot_axis_set_pref              (GogPlot const *plot);
    gboolean            gog_plot_axis_set_is_valid          (GogPlot const *plot,
                                                             GogAxisSet type);
    gboolean            gog_plot_axis_set_assign            (GogPlot *plot,
                                                             GogAxisSet type);
    void                gog_plot_axis_clear                 (GogPlot *plot,
                                                             GogAxisSet filter);
    GogAxis*            gog_plot_get_axis                   (GogPlot const *plot,
                                                             GogAxisType type);
    void                gog_plot_set_axis                   (GogPlot *plot,
                                                             GogAxis *axis);
    void                gog_plot_update_3d                  (GogPlot *plot);
    void                gog_plot_guru_helper                (GogPlot *plot);

## Description

## Details

### GogPlotBoundInfo

    typedef struct {
    	struct {
    		double minima, maxima;
    	} val, logical;
    	gboolean is_discrete;
    	gboolean center_on_ticks;
    	GOFormat *fmt;
    } GogPlotBoundInfo;

### GOG_PLOT_TYPE

    #define GOG_PLOT_TYPE	(gog_plot_get_type ())

### GOG_PLOT()

    #define GOG_PLOT(o)	(G_TYPE_CHECK_INSTANCE_CAST ((o), GOG_PLOT_TYPE, GogPlot))

`o` : |

### IS_GOG_PLOT()

    #define IS_GOG_PLOT(o)	(G_TYPE_CHECK_INSTANCE_TYPE ((o), GOG_PLOT_TYPE))

`o` : |

### gog_plot_get_type ()

    GType               gog_plot_get_type                   (void);

Returns : |

### gog_plot_new_by_type ()

    GogPlot*            gog_plot_new_by_type                (GogPlotType const *type);

`type` : |
Returns : |

### gog_plot_new_by_name ()

    GogPlot*            gog_plot_new_by_name                (char const *id);

`id` : |
Returns : |

### gog_plot_make_similar ()

    gboolean            gog_plot_make_similar               (GogPlot *dst,
                                                             GogPlot const *src);

As much as possible have `dst` use similar formatting and data allocation to `src`.

return TRUE on failue

`dst` : |
`src` : |
Returns : |

### gog_plot_request_cardinality_update ()

    void                gog_plot_request_cardinality_update (GogPlot *plot);

`plot` : |

### gog_plot_update_cardinality ()

    void                gog_plot_update_cardinality         (GogPlot *plot,
                                                             int index_num);

Update cardinality and cache result. See `gog_chart_get_cardinality`.

`plot` : | GogPlot
`index_num` : | index offset for this plot

### gog_plot_get_cardinality ()

    void                gog_plot_get_cardinality            (GogPlot *plot,
                                                             unsigned *full,
                                                             unsigned *visible);

Return the number of logical elements in the plot. See `gog_chart_get_cardinality`.

`full` and `visible` may be NULL.

`plot` : | GogPlot
`full` : | placeholder for full cardinality
`visible` : | placeholder for visible cardinality

### gog_plot_foreach_elem ()

    void                gog_plot_foreach_elem               (GogPlot *plot,
                                                             gboolean only_visible,
                                                             GogEnumFunc handler,
                                                             gpointer data);

`plot` : |
`only_visible` : |
`handler` : |
`data` : |

### gog_plot_get_series ()

    GSListconst *       gog_plot_get_series                 (GogPlot const *plot);

A list of the series in `plot`. Do not modify or free the list.

`plot` : | GogPlot
Returns : |

### gog_plot_get_axis_bounds ()

    GOData*             gog_plot_get_axis_bounds            (GogPlot *plot,
                                                             GogAxisType axis,
                                                             GogPlotBoundInfo *bounds);

Queries `plot` for its axis preferences for `axis` and stores the results in `bounds`. All elements of `bounds` are initialized to sane values before the query _ACCEPT_ ::fmt. The caller is responsible for initializing it. This is done so that once on plot has selected a format the others need not do the lookup too if so desired.

Caller is responsible for unrefing ::fmt.

`plot` : | GogPlot
`axis` : | GogAxisType
`bounds` : | GogPlotBoundInfo
Returns : |

### gog_plot_supports_vary_style_by_element ()

    gboolean            gog_plot_supports_vary_style_by_element
                                                            (GogPlot const *plot);

`plot` : |
Returns : |

### gog_plot_new_series ()

    GogSeries*          gog_plot_new_series                 (GogPlot *plot);

`plot` : |
Returns : |

### gog_plot_description ()

    GogPlotDescconst *  gog_plot_description                (GogPlot const *plot);

`plot` : |
Returns : |

### gog_plot_axis_set_pref ()

    GogAxisSet          gog_plot_axis_set_pref              (GogPlot const *plot);

`plot` : |
Returns : |

### gog_plot_axis_set_is_valid ()

    gboolean            gog_plot_axis_set_is_valid          (GogPlot const *plot,
                                                             GogAxisSet type);

`plot` : |
`type` : |
Returns : |

### gog_plot_axis_set_assign ()

    gboolean            gog_plot_axis_set_assign            (GogPlot *plot,
                                                             GogAxisSet type);

`plot` : |
`type` : |
Returns : |

### gog_plot_axis_clear ()

    void                gog_plot_axis_clear                 (GogPlot *plot,
                                                             GogAxisSet filter);

A utility method to clear all existing axis associations flagged by `filter`

`plot` : | GogPlot
`filter` : | GogAxisSet

### gog_plot_get_axis ()

    GogAxis*            gog_plot_get_axis                   (GogPlot const *plot,
                                                             GogAxisType type);

`plot` : |
`type` : |
Returns : |

### gog_plot_set_axis ()

    void                gog_plot_set_axis                   (GogPlot *plot,
                                                             GogAxis *axis);

Connect `axis` and `plot`.

`plot` : | GogPlot
`axis` : | GogAxis

### gog_plot_update_3d ()

    void                gog_plot_update_3d                  (GogPlot *plot);

`plot` : |

### gog_plot_guru_helper ()

    void                gog_plot_guru_helper                (GogPlot *plot);

`plot` : |