本文整理了Java中org.jfree.chart.plot.XYPlot.getOrientation()
方法的一些代码示例,展示了XYPlot.getOrientation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XYPlot.getOrientation()
方法的具体详情如下:
包路径:org.jfree.chart.plot.XYPlot
类名称:XYPlot
方法名:getOrientation
[英]Returns the orientation of the plot.
[中]返回绘图的方向。
代码示例来源:origin: jfree/jfreechart
Rectangle2D dataArea, double start, double end) {
double x1 = axis.valueToJava2D(start, dataArea,
plot.getDomainAxisEdge());
double x2 = axis.valueToJava2D(end, dataArea,
plot.getDomainAxisEdge());
Rectangle2D band;
if (plot.getOrientation() == PlotOrientation.VERTICAL) {
band = new Rectangle2D.Double(Math.min(x1, x2), dataArea.getMinY(),
Math.abs(x2 - x1), dataArea.getHeight());
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
Rectangle2D dataArea, double start, double end) {
double x1 = axis.valueToJava2D(start, dataArea,
plot.getDomainAxisEdge());
double x2 = axis.valueToJava2D(end, dataArea,
plot.getDomainAxisEdge());
Rectangle2D band;
if (plot.getOrientation() == PlotOrientation.VERTICAL) {
band = new Rectangle2D.Double(Math.min(x1, x2), dataArea.getMinY(),
Math.abs(x2 - x1), dataArea.getWidth());
代码示例来源:origin: jfree/jfreechart
Rectangle2D dataArea, double start, double end) {
double y1 = axis.valueToJava2D(start, dataArea,
plot.getRangeAxisEdge());
double y2 = axis.valueToJava2D(end, dataArea, plot.getRangeAxisEdge());
Rectangle2D band;
if (plot.getOrientation() == PlotOrientation.VERTICAL) {
band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(y1, y2),
dataArea.getWidth(), Math.abs(y2 - y1));
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
Rectangle2D dataArea, double start, double end) {
double y1 = axis.valueToJava2D(start, dataArea,
plot.getRangeAxisEdge());
double y2 = axis.valueToJava2D(end, dataArea, plot.getRangeAxisEdge());
Rectangle2D band;
if (plot.getOrientation() == PlotOrientation.VERTICAL) {
band = new Rectangle2D.Double(dataArea.getMinX(), Math.min(y1, y2),
dataArea.getWidth(), Math.abs(y2 - y1));
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
PlotOrientation orientation = plot.getOrientation();
Line2D line = null;
double v = axis.valueToJava2D(value, dataArea,
plot.getDomainAxisEdge());
if (orientation == PlotOrientation.HORIZONTAL) {
代码示例来源:origin: jfree/jfreechart
/**
* Utility method for drawing a vertical line on the data area of the plot.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param value the coordinate, where to draw the line.
* @param stroke the stroke to use.
* @param paint the paint to use.
*/
protected void drawVerticalLine(Graphics2D g2, Rectangle2D dataArea,
double value, Stroke stroke, Paint paint) {
ValueAxis axis = getDomainAxis();
if (getOrientation() == PlotOrientation.HORIZONTAL) {
axis = getRangeAxis();
}
if (axis.getRange().contains(value)) {
double xx = axis.valueToJava2D(value, dataArea,
RectangleEdge.BOTTOM);
Line2D line = new Line2D.Double(xx, dataArea.getMinY(), xx,
dataArea.getMaxY());
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(line);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
PlotOrientation orientation = plot.getOrientation();
Line2D line = null;
double v = axis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge());
if (orientation == PlotOrientation.HORIZONTAL) {
line = new Line2D.Double(v, dataArea.getMinY(), v,
代码示例来源:origin: jfree/jfreechart
/**
* Utility method for drawing a horizontal line across the data area of the
* plot.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param value the coordinate, where to draw the line.
* @param stroke the stroke to use.
* @param paint the paint to use.
*/
protected void drawHorizontalLine(Graphics2D g2, Rectangle2D dataArea,
double value, Stroke stroke,
Paint paint) {
ValueAxis axis = getRangeAxis();
if (getOrientation() == PlotOrientation.HORIZONTAL) {
axis = getDomainAxis();
}
if (axis.getRange().contains(value)) {
double yy = axis.valueToJava2D(value, dataArea, RectangleEdge.LEFT);
Line2D line = new Line2D.Double(dataArea.getMinX(), yy,
dataArea.getMaxX(), yy);
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(line);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Utility method for drawing a horizontal line across the data area of the
* plot.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param value the coordinate, where to draw the line.
* @param stroke the stroke to use.
* @param paint the paint to use.
*/
protected void drawHorizontalLine(Graphics2D g2, Rectangle2D dataArea,
double value, Stroke stroke,
Paint paint) {
ValueAxis axis = getRangeAxis();
if (getOrientation() == PlotOrientation.HORIZONTAL) {
axis = getDomainAxis();
}
if (axis.getRange().contains(value)) {
double yy = axis.valueToJava2D(value, dataArea, RectangleEdge.LEFT);
Line2D line = new Line2D.Double(dataArea.getMinX(), yy,
dataArea.getMaxX(), yy);
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(line);
}
}
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
/**
* Utility method for drawing a vertical line on the data area of the plot.
*
* @param g2 the graphics device.
* @param dataArea the data area.
* @param value the coordinate, where to draw the line.
* @param stroke the stroke to use.
* @param paint the paint to use.
*/
protected void drawVerticalLine(Graphics2D g2, Rectangle2D dataArea,
double value, Stroke stroke, Paint paint) {
ValueAxis axis = getDomainAxis();
if (getOrientation() == PlotOrientation.HORIZONTAL) {
axis = getRangeAxis();
}
if (axis.getRange().contains(value)) {
double xx = axis.valueToJava2D(value, dataArea,
RectangleEdge.BOTTOM);
Line2D line = new Line2D.Double(xx, dataArea.getMinY(), xx,
dataArea.getMaxY());
g2.setStroke(stroke);
g2.setPaint(paint);
g2.draw(line);
}
}
代码示例来源:origin: jfree/jfreechart
PlotOrientation orientation = plot.getOrientation();
Line2D line = null;
double v = axis.valueToJava2D(value, dataArea, plot.getRangeAxisEdge());
if (orientation == PlotOrientation.HORIZONTAL) {
line = new Line2D.Double(v, dataArea.getMinY(), v,
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
PlotOrientation orientation = plot.getOrientation();
double v = axis.valueToJava2D(value, dataArea,
plot.getDomainAxisEdge());
Line2D line = null;
代码示例来源:origin: superad/pdf-kit
public void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea, ValueAxis domainAxis, ValueAxis rangeAxis, int rendererIndex, PlotRenderingInfo info) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(plot.getDomainAxisLocation(), orientation);
RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(plot.getRangeAxisLocation(), orientation);
double j2DX = domainAxis.valueToJava2D(this.getX(), dataArea, domainEdge);
double j2DY = rangeAxis.valueToJava2D(this.getY(), dataArea, rangeEdge);
double startX;
if(orientation == PlotOrientation.HORIZONTAL) {
代码示例来源:origin: jfree/jfreechart
PlotOrientation orientation = plot.getOrientation();
Line2D line = null;
double v = axis.valueToJava2D(value, dataArea,
plot.getDomainAxisEdge());
if (orientation.isHorizontal()) {
代码示例来源:origin: jfree/jfreechart
PlotRenderingInfo info) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
double x0 = bounds.getMinX();
double x1 = bounds.getMaxX();
double xx0 = domainAxis.valueToJava2D(x0, dataArea, domainEdge);
double xx1 = domainAxis.valueToJava2D(x1, dataArea, domainEdge);
double m00 = (xx1 - xx0) / (x1 - x0);
double m02 = xx0 - x0 * m00;
double yy0 = rangeAxis.valueToJava2D(y0, dataArea, rangeEdge);
double yy1 = rangeAxis.valueToJava2D(y1, dataArea, rangeEdge);
double m11 = (yy1 - yy0) / (y1 - y0);
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
PlotRenderingInfo info) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
double x0 = bounds.getMinX();
double x1 = bounds.getMaxX();
double xx0 = domainAxis.valueToJava2D(x0, dataArea, domainEdge);
double xx1 = domainAxis.valueToJava2D(x1, dataArea, domainEdge);
double m00 = (xx1 - xx0) / (x1 - x0);
double m02 = xx0 - x0 * m00;
double yy0 = rangeAxis.valueToJava2D(y0, dataArea, rangeEdge);
double yy1 = rangeAxis.valueToJava2D(y1, dataArea, rangeEdge);
double m11 = (yy1 - yy0) / (y1 - y0);
代码示例来源:origin: jfree/jfreechart
return;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
double x = domainAxis.valueToJava2D(this.polygon[0], dataArea,
domainEdge);
double y = rangeAxis.valueToJava2D(this.polygon[1], dataArea,
rangeEdge);
if (orientation == PlotOrientation.HORIZONTAL) {
area.moveTo((float) y, (float) x);
for (int i = 2; i < this.polygon.length; i += 2) {
x = domainAxis.valueToJava2D(this.polygon[i], dataArea,
domainEdge);
y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea,
代码示例来源:origin: org.codehaus.jtstand/jtstand-chart
return;
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
double x = domainAxis.valueToJava2D(this.polygon[0], dataArea,
domainEdge);
double y = rangeAxis.valueToJava2D(this.polygon[1], dataArea,
rangeEdge);
if (orientation == PlotOrientation.HORIZONTAL) {
area.moveTo((float) y, (float) x);
for (int i = 2; i < this.polygon.length; i += 2) {
x = domainAxis.valueToJava2D(this.polygon[i], dataArea,
domainEdge);
y = rangeAxis.valueToJava2D(this.polygon[i + 1], dataArea,
代码示例来源:origin: jfree/jfreechart
int rendererIndex, PlotRenderingInfo info) {
PlotOrientation orientation = plot.getOrientation();
RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
plot.getDomainAxisLocation(), orientation);
plot.getRangeAxisLocation(), orientation);
double transX0 = domainAxis.valueToJava2D(this.x0, dataArea,
domainEdge);
double transY0 = rangeAxis.valueToJava2D(this.y0, dataArea, rangeEdge);
double transX1 = domainAxis.valueToJava2D(this.x1, dataArea,
domainEdge);
double transY1 = rangeAxis.valueToJava2D(this.y1, dataArea, rangeEdge);
代码示例来源:origin: fiji/TrackMate
final RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
final double transX0 = domainAxis.valueToJava2D( x0, dataArea, xAxisLocation );
final double transY0 = rangeAxis.valueToJava2D( y0, dataArea, yAxisLocation );
final double transX1 = domainAxis.valueToJava2D( x1, dataArea, xAxisLocation );
final double transY1 = rangeAxis.valueToJava2D( y1, dataArea, yAxisLocation );
return;
final PlotOrientation orientation = plot.getOrientation();
if ( orientation == PlotOrientation.HORIZONTAL )
内容来源于网络,如有侵权,请联系作者删除!