octave-maintainers
[Top][All Lists]
Advanced

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

more graphics changes.


From: John W. Eaton
Subject: more graphics changes.
Date: Wed, 14 Mar 2007 13:14:44 -0400

I just checked in another largeish patch for graphics that moves all
the property database handling code to C++ (src/graphics.cc).  Other
than removing the .m files that were handling this task, there were
not many big changes.

The new code can do some things that the old could not, including
setting and removing default properties and setting factory defaults
in ways that should be compatible with Matlab.  For example,

  set (0, 'defaultlinelinewidth', 2);

sets the default line object linewidth property at the root level, and

  set (gcf, 'defaultlinelinewidth', 2);

does the same for the current figure.  And yes, that is
"defaultlinelinewidth".  The format is "default" + "graphics object
type name" + "property name".

You can use

  set (h, 'defaultlinelinewidth', 'remove')

to remove the default property and

  set (h, 'linewidth', 'factory')

to set a "factory default" value.

The code that traverses the property database and calls gnuplot is
still a .m file, but that seems to be fast enough, at least for
"small" plots.  For example, on my system with

  x = 1:1000;
  y = rand (1000, 100);

the command

  plot (x, y);

takes about .5 seconds, though it is another few seconds before
gnuplot renders the plot.

Some things remain to be done:

  * The list of supported properties is relatively small and there is
    not much checking to ensure that property values make sense.  I
    think we will at least want to improve the checking of the currently
    supported properties before 3.0.

  * We need to decide precisely how a graphics backend that is written
    in C++ should work with the new code.  What interface should be
    exposed to the backend?

It would be helpful to me if people who have been using the new
graphics features could check that I haven't broken too many things.
Please report any problems that you find to this list.

Thanks,

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]