Class BitmapSortPlotVolume


  • public class BitmapSortPlotVolume
    extends PlotVolume
    PlotVolume implementation which accumulates all points to plot and then draws them in a way suitable for a bitmap-type context. Transparency is rendered. Points with and without error bars can be plotted.
    Since:
    26 Mar 2007
    Author:
    Mark Taylor
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  BitmapSortPlotVolume.Workspace
      Opaque workspace object for use with BitmapSortPlotVolume instances.
    • Constructor Detail

      • BitmapSortPlotVolume

        public BitmapSortPlotVolume​(java.awt.Component c,
                                    java.awt.Graphics g,
                                    MarkStyle[] styles,
                                    double padFactor,
                                    int[] padBorders,
                                    double fogginess,
                                    boolean hasLabels,
                                    boolean hasErrors,
                                    double zmin,
                                    double zmax,
                                    DataColorTweaker tweaker,
                                    BitmapSortPlotVolume.Workspace ws)
        Constructor.
        Parameters:
        c - component
        g - graphics context
        styles - array of marker styles which may be used to plot
        padFactor - minimum amount of space outside the unit cube in both dimensions - 1 means no extra space
        padBorders - space, additional to padFactor, to be left around the edges of the plot; order is (left,right,bottom,top)
        fogginess - thickness of fog for depth shading
        hasLabels - must be true if any of the points to be plotted will have associated labels
        hasErrors - must be true if any of the points to be plotted will contain errors
        zmin - a lower limit for z coordinates of plotted points
        zmax - an upper limit for z coordinates of plotted points
        tweaker - colour adjuster for using auxiliary axis coords
        ws - workspace object
    • Method Detail

      • plot2d

        public void plot2d​(int px,
                           int py,
                           double z,
                           double[] coords,
                           int istyle,
                           boolean showPoint,
                           java.lang.String label,
                           int nerr,
                           int[] xoffs,
                           int[] yoffs,
                           double[] zerrs)
        Description copied from class: PlotVolume
        Plots an marker and optional associated error values at a given point in graphics coordinates with given additional Z coordinates. Points with greater Z values should obscure points with lesser ones. The ordering of the error points is that required by the ErrorRenderer class.

        Most implementations currently ignore the Z values associated with the error points, and put everything at the depth of the central point, because it's too hard to do otherwise. Does this produce seriously confusing visualisation?

        Specified by:
        plot2d in class PlotVolume
        Parameters:
        px - graphics space X coordinate of the central point
        py - graphics space Y coordinate of the central point
        z - depth of point; a point with a greater z should obscure a point with a lesser one
        coords - original coordinate array; as well as (redundant) x,y,z values it may contain auxiliary axis coordinates
        istyle - index of the style used to plot the point
        showPoint - whether the central point is to be plotted
        label - label for point, or null
        nerr - number of error points, or zero for no errors
        xoffs - nerr-element array of graphics space X coordinates for error points
        yoffs - nerr-element array of graphics space Y coordinates for error points
        zerrs - nerr-element array of depths for error points
      • flush

        public void flush()
        Do the plotting.
        Specified by:
        flush in class PlotVolume