PHPlot should provide finer control over the colors of plot elements. Currently, for example, all three titles (main, X, and Y) have to be the same color. Multiple elements also use the 'grid', 'light grid', and 'text' color selectors. It should be possible to apply colors to specific elements, such as "X title", or even "left side Y title".
Any changes need to be compatible, by keeping the same defaults, and making sure the same functions have the same results. For example, SetTitleColor needs to set the color (or default color) for all 3 titles.
Discussion: Make Legend colorbox border optional
Wiki: 6.0.0-NEWS
Implemented separate color controls for X and Y titles. SetTitleColor now sets the main title color and the defaults for the X and Y title, which can be overridden by SetXTitleColor and SetYTitleColor. Documentation updated. This part is in CVS and will be in the next release.
As part of the fix for bug #3486834 "Wrong color for data value labels", new color control functions were added for Tick Labels, Data Labels, Data Value Labels, and Pie Labels. These elements can now have their colors set independent of other elements, with (mostly) compatible default behavior.
Separately, some research was done on a new way of setting colors for elements. This would use a hierarchical structure, similar to the X resource database but without wildcards. For example, you could set the colors for the X axis title by specifying "text.title.x", or "text.title" to apply to all titles, or "text" to apply (or be the default) for all text. It is very flexible, but there are problems, such as not catching errors. This is not ready for implementation.
See feature request [feature-requests:#46] "control pie chart borders". There is now a separate control for the color of pie chart borders, defaulting to the grid color for compatibility.
Related
Feature Requests:
#46Added new function SetLegendBgColor() to control the legend background color. If this is not used, the color defaults to the image background color, which is compatible with older versions.
Added new function SetLegendTextColor() to control the legend text color. If this is not used, the text color defaults to the general text color (per SetTextColor()), which is compatible with older versions.
Code and documentation are commited to SVN on /Rel6 branch. New test scripts are on the trunk.
Closing this for PHPlot-6.0.0. Several new color control functions have been added (see the table of element colors in the PHPlot Reference Manual). There are still shared color settings, but this one feature request is not working out as a way to keep track. The hierarchical color control described above seems unlikely - too complex and creates some ambiguities.
Will open new feature requests as needed for additional cases where finer color control is needed.
Parts implemented in 6.0.0 as described above, others feature requests will be opened as needed.