本文整理了Java中org.jfree.chart.plot.XYPlot.setRangeGridlinesVisible()
方法的一些代码示例,展示了XYPlot.setRangeGridlinesVisible()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.setRangeGridlinesVisible()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:setRangeGridlinesVisible
[英]Sets the flag that controls whether or not the range axis grid lines are visible.
If the flag value is changed, a PlotChangeEvent is sent to all registered listeners.
[中]设置控制范围轴网格线是否可见的标志。
如果标志值已更改,则会向所有注册的侦听器发送PlotChangeEvent。
代码示例来源:origin: org.n52.sensorweb/timeseries-io
private void showGridlinesOnChart(XYPlot xyPlot) {
boolean grid = getChartStyleDefinitions().isGrid();
xyPlot.setDomainGridlinesVisible(grid);
xyPlot.setRangeGridlinesVisible(grid);
}
代码示例来源:origin: org.n52.series-api/io
private void showGridlinesOnChart(XYPlot plot) {
IoParameters parameters = getParameters();
boolean showGrid = parameters.isGrid();
plot.setDomainGridlinesVisible(showGrid);
plot.setRangeGridlinesVisible(showGrid);
}
代码示例来源:origin: senbox-org/snap-desktop
private void setGridVisible(boolean visible) {
chart.getXYPlot().setDomainGridlinesVisible(visible);
chart.getXYPlot().setRangeGridlinesVisible(visible);
}
代码示例来源:origin: bcdev/beam
private void setGridVisible(boolean visible) {
chart.getXYPlot().setDomainGridlinesVisible(visible);
chart.getXYPlot().setRangeGridlinesVisible(visible);
}
代码示例来源:origin: stackoverflow.com
private JFreeChart createChart() {
final XYDataset dataset = this.createDataset(series);
final JFreeChart result = ChartFactory.createTimeSeriesChart("Dynamic Line And TimeSeries Chart", "Time", "Value", dataset, true, true, false);
final XYPlot plot = result.getXYPlot();
plot.setBackgroundPaint(new Color(0xffffe0));
plot.setDomainGridlinesVisible(true);
plot.setDomainGridlinePaint(Color.LIGHT_GRAY);
plot.setRangeGridlinesVisible(true);
plot.setRangeGridlinePaint(Color.LIGHT_GRAY);
// first time series
this.firstTimeSeries(plot);
// second time series
this.secondTimeSeries(plot);
// third time series
this.thirdTimeSeries(plot);
return result;
}
代码示例来源:origin: com.atlassian.jira/jira-api
public static void setupPlot(XYPlot plot)
{
plot.setBackgroundPaint(ChartDefaults.transparent);
plot.setOutlinePaint(ChartDefaults.transparent);
plot.setRangeGridlinePaint(ChartDefaults.gridLineColor);
plot.setRangeGridlineStroke(new BasicStroke(0.5f));
plot.setRangeGridlinesVisible(true);
plot.setRangeAxisLocation(ChartDefaults.rangeAxisLocation);
plot.setDomainGridlinesVisible(true);
ChartUtil.setupRangeAxis(plot.getRangeAxis());
ChartUtil.setupDomainAxis(plot.getDomainAxis());
}
代码示例来源:origin: com.atlassian.confluence.extra.chart/chart-plugin
public static void setupPlot(XYPlot plot)
{
plot.setBackgroundPaint(ChartDefaults.transparent);
plot.setOutlinePaint(ChartDefaults.transparent);
plot.setRangeGridlinePaint(ChartDefaults.gridLineColor);
plot.setRangeGridlineStroke(new BasicStroke(0.5f));
plot.setRangeGridlinesVisible(true);
plot.setRangeAxisLocation(ChartDefaults.rangeAxisLocation);
plot.setDomainGridlinesVisible(true);
ChartUtil.setupRangeAxis(plot.getRangeAxis());
ChartUtil.setupDomainAxis(plot.getDomainAxis());
}
代码示例来源:origin: org.openfuxml/ofx-chart
@Override
protected void setSpecialGrid()
{
XYPlot plot = (XYPlot) chart.getPlot();
Grid grid = ofxChart.getGrid();
if(grid.isSetDomain()){plot.setDomainGridlinesVisible(grid.isDomain());}
if(grid.isSetRange()){plot.setRangeGridlinesVisible(grid.isRange());}
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
public void enableGrid(boolean enable)
{
if (enable)
{
BasicStroke dotted = new BasicStroke(1.0f, BasicStroke.CAP_ROUND, BasicStroke.JOIN_ROUND, 1.0f, new float[] {1.0f, 6.0f}, 0.0f);
graph.getXYPlot().setDomainGridlinesVisible(true);
graph.getXYPlot().setRangeGridlinesVisible(true);
graph.getXYPlot().setRangeGridlinePaint(Color.black);
graph.getXYPlot().setDomainGridlinePaint(Color.black);
graph.getXYPlot().setRangeGridlineStroke(dotted);
graph.getXYPlot().setDomainGridlineStroke(dotted);
}
else
{
graph.getXYPlot().setDomainGridlinesVisible(false);
graph.getXYPlot().setRangeGridlinesVisible(false);
}
}
代码示例来源:origin: cpesch/RouteConverter
private XYPlot createPlot(JFreeChart chart) {
XYPlot plot = chart.getXYPlot();
plot.setForegroundAlpha(0.65F);
plot.setDomainGridlinesVisible(preferences.getBoolean(X_GRID_PREFERENCE, true));
plot.setRangeGridlinesVisible(preferences.getBoolean(Y_GRID_PREFERENCE, true));
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setAutoRangeIncludesZero(false);
rangeAxis.setStandardTickUnits(createIntegerTickUnits());
Font font = new JLabel().getFont();
rangeAxis.setLabelFont(font);
NumberAxis domainAxis = (NumberAxis) plot.getDomainAxis();
domainAxis.setStandardTickUnits(createIntegerTickUnits());
domainAxis.setLowerMargin(0.0);
domainAxis.setUpperMargin(0.0);
domainAxis.setLabelFont(font);
plot.getRenderer().setBaseToolTipGenerator(null);
return plot;
}
代码示例来源:origin: matsim-org/matsim
public static JFreeChart chartProfile(DefaultTableXYDataset dataset, ChartType type) {
JFreeChart chart;
switch (type) {
case Line:
chart = ChartFactory
.createXYLineChart("TimeProfile", "Time [h]", "Values", dataset, PlotOrientation.VERTICAL, true,
false, false);
break;
case StackedArea:
chart = ChartFactory.createStackedXYAreaChart("TimeProfile", "Time [h]", "Values", dataset,
PlotOrientation.VERTICAL, true, false, false);
break;
default:
throw new IllegalArgumentException();
}
XYPlot plot = chart.getXYPlot();
plot.setRangeGridlinesVisible(false);
plot.setDomainGridlinesVisible(false);
plot.setBackgroundPaint(Color.white);
NumberAxis xAxis = (NumberAxis)plot.getDomainAxis();
xAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
NumberAxis yAxis = (NumberAxis)plot.getRangeAxis();
yAxis.setAutoRange(true);
XYItemRenderer renderer = plot.getRenderer();
for (int s = 0; s < dataset.getSeriesCount(); s++) {
renderer.setSeriesStroke(s, new BasicStroke(2));
}
return chart;
}
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
graph.getXYPlot().setRangeGridlinesVisible(false);
graph.getXYPlot().setRangeGridlineStroke(new BasicStroke(3f));
代码示例来源:origin: org.cytoscape/network-analyzer-impl
/**
* Updates the axis-related properties of a plot.
*
* @param aPlot
* Plot to be updated.
* @param aAxes
* Axis-related visual settings to be applied.
* @param aGrid
* Grid-related visual settings to be applied.
*/
private static void updateAxes(XYPlot aPlot, AxesSettings aAxes, GridSettings aGrid,
Range aDomainDataRange, Range aRangeDataRange) {
aPlot.setDomainAxis(createAxis(aAxes, true, aDomainDataRange));
aPlot.setRangeAxis(createAxis(aAxes, false, aRangeDataRange));
aPlot.setDomainGridlinesVisible(aGrid.getVerticalGridLines()); // set gridlines for X axis
aPlot.setDomainGridlinePaint(aGrid.getGridLinesColor()); // set color of domain gridline
aPlot.setRangeGridlinesVisible(aGrid.getHorizontalGridLines()); // set gridlines for Y axis
aPlot.setRangeGridlinePaint(aGrid.getGridLinesColor()); // set color of range gridline
}
代码示例来源:origin: matsim-org/matsim
plot.setRangeGridlinesVisible(false);
plot.setDomainGridlinesVisible(false);
plot.setBackgroundPaint(Color.white);
代码示例来源:origin: matsim-org/matsim
plot.setRangeGridlinesVisible(false);
plot.setDomainGridlinesVisible(false);
plot.setBackgroundPaint(Color.white);
代码示例来源:origin: org.hudsonci.plugins/analysis-core
/**
* Creates a XY graph from the specified data set.
*
* @param dataset
* the values to display
* @return the created graph
*/
public JFreeChart createXYChart(final XYDataset dataset) {
JFreeChart chart = ChartFactory.createXYAreaChart(
null, // chart title
null, // unused
"count", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
false, // include legend
true, // tooltips
false // urls
);
chart.setBackgroundPaint(Color.white);
XYPlot plot = chart.getXYPlot();
plot.setRenderer(new XYDifferenceRenderer(ColorPalette.BLUE, ColorPalette.RED, false));
plot.setRangeGridlinesVisible(true);
plot.setRangeGridlinePaint(Color.black);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
setPlotProperties(plot);
return chart;
}
代码示例来源:origin: jenkinsci/analysis-core-plugin
/**
* Creates a XY graph from the specified data set.
*
* @param dataset
* the values to display
* @return the created graph
*/
public JFreeChart createXYChart(final XYDataset dataset) {
JFreeChart chart = ChartFactory.createXYAreaChart(
null, // chart title
null, // unused
"count", // range axis label
dataset, // data
PlotOrientation.VERTICAL, // orientation
false, // include legend
true, // tooltips
false // urls
);
chart.setBackgroundPaint(Color.white);
XYPlot plot = chart.getXYPlot();
plot.setRenderer(new XYDifferenceRenderer(ColorPalette.BLUE, ColorPalette.RED, false));
plot.setRangeGridlinesVisible(true);
plot.setRangeGridlinePaint(Color.black);
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
setPlotProperties(plot);
return chart;
}
代码示例来源:origin: zolyfarkas/spf4j
plot.setBackgroundPaint(Color.white);
plot.setDomainGridlinesVisible(false);
plot.setRangeGridlinesVisible(false);
plot.setRangeMinorGridlinesVisible(false);
JFreeChart chart = new JFreeChart(chartName, plot);
代码示例来源:origin: sjsdfg/dl4j-tutorials
plot.setBackgroundPaint(Color.lightGray);
plot.setDomainGridlinesVisible(false);
plot.setRangeGridlinesVisible(false);
plot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
JFreeChart chart = new JFreeChart("", plot);
代码示例来源:origin: org.jboss.seam/jboss-seam-pdf
plot.setRangeGridlinesVisible(getRangeGridlinesVisible());
内容来源于网络,如有侵权,请联系作者删除!