Menu

#29 Finer control over plot element colors

6.0.0
closed
lbayuk
None
3
Fixed
2013-04-03
2010-09-28
lbayuk
No

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.

Related

Discussion: Make Legend colorbox border optional
Wiki: 6.0.0-NEWS

Discussion

  • lbayuk

    lbayuk - 2010-10-01

    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.

     
  • lbayuk

    lbayuk - 2012-02-18

    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.

     
  • lbayuk

    lbayuk - 2012-09-21

    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: #46

  • lbayuk

    lbayuk - 2013-01-18

    Added 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.

     
  • lbayuk

    lbayuk - 2013-03-28

    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.

     
  • lbayuk

    lbayuk - 2013-03-28
    • milestone: --> 6.0.0
    • resolution: --> Fixed
     
  • lbayuk

    lbayuk - 2013-04-03
    • status: open --> closed
     
  • lbayuk

    lbayuk - 2013-04-03

    Parts implemented in 6.0.0 as described above, others feature requests will be opened as needed.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.