public void MergeYBoundsInto(IPlotArea layer, IPhysicalBoundaries pb, PlotItemCollection coll)
        {
            if (!(pb is NumericalBoundaries))
            {
                CoordinateTransformingStyleBase.MergeYBoundsInto(pb, coll);
                return;
            }

            NumericalBoundaries ybounds = (NumericalBoundaries)pb.Clone();

            ybounds.Reset();

            int nItems = 0;

            foreach (IGPlotItem pi in coll)
            {
                if (pi is IYBoundsHolder)
                {
                    IYBoundsHolder ybpi = (IYBoundsHolder)pi;
                    ybpi.MergeYBoundsInto(ybounds);
                }
                if (pi is G2DPlotItem)
                {
                    nItems++;
                }
            }


            if (nItems == 0)
            {
                _yinc = 0;
            }
            else
            {
                _yinc = (ybounds.UpperBound - ybounds.LowerBound) / nItems;
            }

            int idx = 0;

            foreach (IGPlotItem pi in coll)
            {
                if (pi is IYBoundsHolder)
                {
                    IYBoundsHolder ybpi = (IYBoundsHolder)pi;
                    ybounds.Reset();
                    ybpi.MergeYBoundsInto(ybounds);
                    ybounds.Shift(_yinc * idx);
                    pb.Add(ybounds);
                }
                if (pi is G2DPlotItem)
                {
                    idx++;
                }
            }
        }
 public static void MergeYBoundsInto(IPhysicalBoundaries pb, PlotItemCollection coll)
 {
     foreach (IGPlotItem pi in coll)
     {
         if (pi is IYBoundsHolder)
         {
             IYBoundsHolder plotItem = (IYBoundsHolder)pi;
             plotItem.MergeYBoundsInto(pb);
         }
     }
 }