#25 Add to plot and image border options

closed
lbayuk
None
5
2012-09-07
2010-05-17
Tim Wagner
No

It would be fine to add a fifth possibility as parameter for method SetPlotBorderType, e. g. 'bottom' that allows to render a grid border at the bottom of the plot area. Actually i've to render a chart with grid borders on the left side and the bottom but i didn't found a possibilty to do this.

Discussion

  • lbayuk
    lbayuk
    2010-05-18

    Not hard to implement, but I'm not sure if it will do what you want. Note that the plot border is the inner border, inside the tick and data labels. The bottom side of the plot border is usually where the X axis line is drawn, and the left side border is on top of the Y axis line. Unless you move the axes, or have negative Y data, these sides of the border just get drawn over the axis lines. Can you clarify that this is what you want?

     
  • lbayuk
    lbayuk
    2010-05-29

    No followup received, but this is an area of PHPlot that is due for improvement and easy enough to change. The following changes are planned:

    1. SetPlotBorderType() will accept more options, as well as an array of options, giving complete control over which sides to draw.

    2. SetImageBorderType() will have a new option 'solid' that uses the actual color set with SetImageBorderColor(), rather than a darker shade as 'plain' uses. I think using the darker shade for 'plain' is a bug, but addressing it this way avoids compatibility problems.

    3. A new function SetImageBorderWidth() will be added to set the width of the image border. The border width will now be taken into account when calculating the plot area margins, but plots with the default width (1 for plain or solid, 2 for raised) will not change at all.

     
  • lbayuk
    lbayuk
    2010-05-29

    Title changed from "Adding possibility to plot border at grid bottom" to "Add to plot and image border options".

    This is been implemented and committed to CVS. It will be in the next PHPlot release. Documentation is in progress.

     
  • Tim Wagner
    Tim Wagner
    2010-06-13

    Hello, thanks for your quick work. I'll implement the new feature in the next release of my extension. Great work :)

     
  • lbayuk
    lbayuk
    2010-06-30

    This has been implemented in PHPlot-5.1.2