Re: [guppi-list] Re: Plot idl



Havoc Pennington wrote:
[snip]
> The remaining problem, for the IDL as well as Guppi, is handling arrays of
> plots and overlaid plots simultaneously. Basically for each X axis, there
> is a sequence of Vector pairs for each Y axis. When edited interactively
> in arbitrary ways this gets real annoying. :-) The Vector pairs are one X
> vector and one Y vector for each overlay.

Yeah, its a real mess.  As far as the IDL is concerned, I would just
stick with "simple" scatter plots for now with 1 X Vector and 1 Y
Vector.  If the user wants to overlay multiple plots, they can create
the plots from within gnumeric (through calls to guppi's Plot
interface), and then use guppi directly to overlay the plots and move
axes around.

Within guppi you could use something like this (simplified and in C for
brevity):

struct Axis {
  char *label;
  double *minimum;
  double *maximum;
  double *position; /* Allows for left/top, right/bottom, or in between
*/
};

struct 2DScatterPlot {
  /* Note that Axes can be shared between plots... */
  struct Axis *x_axis;
  struct Axis *y_axis;

  /* ...and so can Vectors (which can also be provided by a remote
server)*/
  Vector *x_vector;
  Vector *y_vector;
};

struct TwoDScatterPlotList {
  /* Linked list of plots in display order. */
  /* C array, C++ Vector<>, etc, would work equally well. */
  struct TwoDScatterPlot *plot;
  struct TwoDScatterPlotList *rest_of_plots;
};

If that doesn't make sense, let me know and I'll try a more detailed
explanation.  If the above model (or another model) works out well and
seems stable within guppi, it could be exported via IDL.

--Dean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]