Stef Mientki wrote:
I'm building a component derived from MatPlot,
This looks like a question for the matplotlib list.
and can be changed by
rcParams [ 'grid.color' ] = ...
This has no effect, after the Figure / FigureCanvas are created.
I suspect that you can change the grid color, not by changing and rcParam, which really is setting defaults, but by changing it on your Figure object, or maybe the axis object that you're using. That shouldn't require destroying the FigureCanvas.
Take a look at the matplotlib class docs to figure out how to do it.
-CHB
···
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
Christopher Barker wrote:
Stef Mientki wrote:
I'm building a component derived from MatPlot,
This looks like a question for the matplotlib list.
and can be changed by
rcParams [ 'grid.color' ] = ...
This has no effect, after the Figure / FigureCanvas are created.
I suspect that you can change the grid color, not by changing and rcParam, which really is setting defaults, but by changing it on your Figure object, or maybe the axis object that you're using. That shouldn't require destroying the FigureCanvas.
Take a look at the matplotlib class docs to figure out how to do it.
hi Christopher,
thanks for the hints.
I have read several MatPlot manuals, but none of them is complete,
together with the many possibilities of MatPlot it's really a crime to search.
But searching all MatPlotfiles for "grid" , I finally found it:
axes.grid ( color = ... )
That was my last problem with MatPlot,
so now I hope I've put enough flexibility in my MatPlot component,
that I'll never have to search into the source code of MatPlot again 
cheers,
Stef
···
It isn't as simple as I told in the previous post:
But searching all MatPlotfiles for "grid" , I finally found it:
axes.grid ( color = ... )
although the wx implementation of MatPlot is very flexible and beautiful,
I noticed a few flaws / bugs,
and maybe this information might be useful to someone.
polar plot : grid and axis not properly alligned
polar plot : grid color is not affected by axis.grid ( color = ...) only by rcParams [ 'grid.color' ] = .. which needs a new figurse / figurecanvas
normal plot : if axis is removed, grid is also removed (works ok for polar plots)
pseudo-color plot : drawing crosshair, sometimes enlarges the image by 1 major tick (probably rounding errors),
depending on the size of the image: sometimes on top, sometimes to the right, sometimes both, sometimes none
all: axis.grid ( color = ...) sometimes gives an error "unknown keyword 'color' " , this seems to happen totally random,
workaround is simple: try / except
all: turning grid on /off sometimes doesn't work anymore
polar plot: doesn't recognize legend (this is a MatPlot known bug)
cheers,
Setf
Stef Mientki wrote:
although the wx implementation of MatPlot is very flexible and beautiful,
I noticed a few flaws / bugs,
Please post a note about these to the matplotlib list -- none of these look specific to wx, and bugs about the wx MPL back-ends should be posted on the MPL lists anyway.
-Chris
···
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception