unify color system

Bug #348831 reported by Michael Wayne Goodman on 2009-03-26

This bug report was converted into a question: question #66043: unify color system.

Affects Status Importance Assigned to Milestone
Cairo Plot

Bug Description

Currently the color systems are idiosyncratic for each plot. The current settings look very nice and should be left as the default, but if I, say, want to have a linear gradient on a pie chart or no gradient on a bar chart, then i should be able to.

I can imagine a couple possible solutions:

(1) create a Color class that is used by all plots, and specifies not only the color, but the fill type (radial/linear/no gradient) and perhaps other parameters as well.

(2) have all plots interface for color specifications the same way. for example, some_plot = a_plot(..., colors=[(.2,.2,.8,'solid'),(.8,.2,.2,'linear')], ...)

Also, it would be nice to have pattern fills. For example, instead of a gradient, i may want a hatch or dot pattern to fill the shape. This should be possible with Cairo surfaces. (but really this is a separate feature request and should be in a different bug)

Magnun Leno (magnun-leno) wrote :

It's a really good suggestion!

Currently I'm developing a data structure to simplify the arguments used in each plot. In this structure is predicted to have the colors of each 'group'. I'll add the 'field' for the filling type (radial, gradient, linear). Any other suggestion?

I think you can consider it as a planned feature! Just waiting Rodrigo's approval.


Magnun Leno (magnun-leno) wrote :

Converting this bug into a question, since it's a suggestion :)

Changed in cairoplot:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related questions