/** * Sets the stacking behavior of the bars. * The default stacking behavior is to plot multiple bars adjacent. * @param stack true, if stacking bars; false, otherwise. */ public void setStackBars(boolean stack) { _stackingBars = stack; updateBestProjectors(); repaint(); }
/** * Sets the line width. * The default width is zero, for the thinnest lines. * @param width the line width. */ public void setLineWidth(float width) { if (_lineWidth!=width) { _lineWidth = width; updateBestProjectors(); repaint(); } }
/** * Sets the orientation of (x1,x2) axes. * @param orientation the orientation. */ public void setOrientation(Orientation orientation) { if (_orientation!=orientation) { _orientation = orientation; updateBestProjectors(); repaint(); } }
/** * Sets the alignment of the bars. * The default alignment is centered about the value's tick mark. * @param alignment the bar alignment. */ public void setAlignment(Alignment alignment) { if (_alignment!=alignment) { _alignment = alignment; updateBestProjectors(); repaint(); } }
/** * Sets array of (x1,x2) coordinates for a plot segment. * The lengths of x1 and x2 must be equal. * @param x1 array of x1 values. * @param x2 array of x2 coordinates. */ public void set(float[] x1, float[] x2) { Check.argument(x1.length==x2.length,"x1.length equals x2.length"); _ns = 1; _nx.clear(); _x1.clear(); _x2.clear(); _nxmax = x1.length; _nx.add(x1.length); _x1.add(copy(x1)); _x2.add(copy(x2)); _colorMaps = new ColorMap[_ns]; for (int i=0; i<_ns; ++i) _colorMaps[i] = new ColorMap(Color.CYAN); _lineColor = new Color[_ns]; updateBestProjectors(); repaint(); }
/** * Sets array of arrays of (x1,x2) coordinates for multiple plot segments. * The lengths of the specified arrays x1 and x2 must be equal. * @param x1 array of arrays of x1 values. * @param x2 array of arrays of x2 coordinates. */ public void set(float[][] x1, float[][] x2) { Check.argument(x1.length==x2.length,"x1.length equals x2.length"); _ns = x1.length; _nx.clear(); _x1.clear(); _x2.clear(); _nxmax = 0; for (int is=0; is<_ns; ++is) { Check.argument(x1[is].length==x2[is].length, "x1[i].length equals x2[i].length"); _nxmax = max(_nxmax,x1[is].length); _nx.add(x1[is].length); _x1.add(copy(x1[is])); _x2.add(copy(x2[is])); } _colorMaps = new ColorMap[_ns]; for (int i=0; i<_ns; ++i) _colorMaps[i] = new ColorMap(Color.CYAN); _lineColor = new Color[_ns]; updateBestProjectors(); repaint(); }