/** * Sets the bar width. * The default width will be 1, or fully expanded bars. * @param width the bar width in range [0.0 - 1.0] */ public void setBarWidth(float width) { _barWidth = width; repaint(); }
/** * Sets a color map for a specific bar set. * @param i index of a bar set. * @param colorMap a color map. */ public void setColorMap(int i, ColorMap colorMap) { _colorMaps[i] = colorMap; repaint(); }
/** * Sets the format used for text labels. * The default format is "%1.4G". * @param format the text format. */ public void setTextFormat(String format) { _textFormat = format; repaint(); }
/** * Sets the line style. * The default style is solid. * @param style the line style. */ public void setLineStyle(Line style) { _lineStyle = style; repaint(); }
/** * Sets the line color for a set of bars. * The default line color is the tile foreground color. * That default is used if the specified line color is null. * @param ibar the index of the set of bars. * @param color the line color; null, for tile foreground color. */ public void setLineColor(int ibar, Color color) { _lineColor[ibar] = color; repaint(); } /**
/** * 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 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 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 a color model for a specific bar set. * @param i index of a bar set. * @param colorModel a color model. */ public void setColorModel(int i, IndexColorModel colorModel) { _colorMaps[i].setColorModel(colorModel); repaint(); }
/** * Sets the fill color for a set of bars. * The default fill color is the tile background color. * @param i the index of a bar set. * @param color the bar color. */ public void setFillColor(int i, Color color) { _colorMaps[i] = new ColorMap(color); 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(); }