⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 graph.dataset.html

📁 java 作图的程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<b>data</b><pre>  protected double data[]</pre><dl>  <dd> The array containing the actual data</dl><a name="length"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>length</b><pre>  protected int length</pre><dl>  <dd> The number of data points stored in the data array</dl><a name="xrange"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>xrange</b><pre>  protected double xrange</pre><dl>  <dd> The X range of the clipped data</dl><a name="yrange"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>yrange</b><pre>  protected double yrange</pre><dl>  <dd> The Y range of the clipped data</dl><a name="legend_length"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_length</b><pre>  protected int legend_length</pre><dl>  <dd> The length of the example line in the data legend.</dl><a name="legend_text"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_text</b><pre>  protected <a href="graph.TextLine.html#_top_">TextLine</a> legend_text</pre><dl>  <dd> The legend text</dl><a name="legend_ix"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_ix</b><pre>  protected int legend_ix</pre><dl>  <dd> The X pixel position of the data legend</dl><a name="legend_iy"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_iy</b><pre>  protected int legend_iy</pre><dl>  <dd> The Y pixel position of the data legend</dl><a name="legend_dx"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_dx</b><pre>  protected double legend_dx</pre><dl>  <dd> The X data position of the data legend</dl><a name="legend_dy"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>legend_dy</b><pre>  protected double legend_dy</pre><dl>  <dd> The Y data position of the data legend</dl><a name="increment"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>increment</b><pre>  protected int increment</pre><dl>  <dd> The amount to increment the data array when the append method is being   used.</dl><a name="stride"><img src="images/magenta-ball.gif" width=12 height=12 alt=" o "></a><b>stride</b><pre>  protected int stride</pre><dl>  <dd> The stride of the data. For data pairs (x,y) the stride is 2</dl><a name="constructors"></a><h2>  <img src="images/constructors.gif" width=231 height=38 alt="Constructors"></h2><a name="DataSet"></a><a name="DataSet()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>DataSet</b><pre>  public DataSet()</pre><dl>  <dd> Instantiate an empty data set.</dl><a name="DataSet(int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>DataSet</b><pre>  public DataSet(int stride) throws <a href="java.lang.Exception.html#_top_">Exception</a></pre><dl>  <dd> Instantiate an empty data set. @param stride the stride of the data set. The default stride is 2.</dl><a name="DataSet(double[], int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>DataSet</b><pre>  public DataSet(double d[],                 int n) throws <a href="java.lang.Exception.html#_top_">Exception</a></pre><dl>  <dd> Instantiate a DataSet with the parsed data. Default stride is 2.The double array contains the data. The X data is expected inthe even indices, the y data in the odd. The integer n is thenumber of data Points. This means that the length of the dataarray is 2*n.  <dl>    <dt> <b>Parameters:</b>    <dd> d - Array containing the (x,y) data pairs.    <dd> n - Number of (x,y) data pairs in the array.    <dt> <b>Throws:</b> <a href="Exception.html#_top_">Exception</a>    <dd> A Generic exception if it fails to load the           parsed array into the class.  </dl></dl><a name="DataSet(double[], int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a><b>DataSet</b><pre>  public DataSet(double d[],                 int n,                 int s) throws <a href="java.lang.Exception.html#_top_">Exception</a></pre><dl>  <dd> Instantiate a DataSet with the parsed data.The double array contains the data. The X data is expected to be inindices i*stride where i=0,1,... The Y data is expected to be foundin indices i*stride+1 where i=0,1,2...The integer n is thenumber of data Points. This means that the length of the dataarray is 2*stride.  <dl>    <dt> <b>Parameters:</b>    <dd> d - Array containing the (x,y) data pairs.    <dd> n - Number of (x,y) data pairs in the array.    <dd> s - The stride of the data.    <dt> <b>Throws:</b> <a href="Exception.html#_top_">Exception</a>    <dd> A Generic exception if it fails to load the           parsed array into the class.  </dl></dl><a name="methods"></a><h2>  <img src="images/methods.gif" width=151 height=38 alt="Methods"></h2><a name="append(double[], int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="append"><b>append</b></a><pre>  public void append(double d[],                     int n) throws <a href="java.lang.Exception.html#_top_">Exception</a></pre><dl>  <dd> Append data to the data set.  <dl>    <dt> <b>Parameters:</b>    <dd> d - Array containing (x,y) pairs to append    <dd> n - Number of (x,y) data pairs in the array.    <dt> <b>Throws:</b> <a href="Exception.html#_top_">Exception</a>    <dd> A generic exception if it fails to load the           parsed array into the class.  </dl></dl><a name="delete(int, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="delete"><b>delete</b></a><pre>  public void delete(int start,                     int end)</pre><dl>  <dd> Delete data from the data set (start and end are inclusive).The first (x,y) pair in the data set start at index 0.  <dl>    <dt> <b>Parameters:</b>    <dd> start - The start (x,y) pair index.    <dd> end - The end (x,y) pair index.  </dl></dl><a name="deleteData()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="deleteData"><b>deleteData</b></a><pre>  public void deleteData()</pre><dl>  <dd> Delete all the data from the data set.</dl><a name="draw_data(java.awt.Graphics, java.awt.Rectangle)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="draw_data"><b>draw_data</b></a><pre>  public void draw_data(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,                        <a href="java.awt.Rectangle.html#_top_">Rectangle</a> bounds)</pre><dl>  <dd> Draw the straight line segments and/or the markers at thedata points.If this data has been attached to an Axis then scale the databased on the axis maximum/minimum otherwise scale usingthe data's maximum/minimum  <dl>    <dt> <b>Parameters:</b>    <dd> g - Graphics state    <dd> bounds - The data window to draw into  </dl></dl><a name="getXmax()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getXmax"><b>getXmax</b></a><pre>  public double getXmax()</pre><dl>  <dd> return the data X maximum.</dl><a name="getXmin()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getXmin"><b>getXmin</b></a><pre>  public double getXmin()</pre><dl>  <dd> return the data X minimum.</dl><a name="getYmax()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getYmax"><b>getYmax</b></a><pre>  public double getYmax()</pre><dl>  <dd> return the data Y maximum.</dl><a name="getYmin()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getYmin"><b>getYmin</b></a><pre>  public double getYmin()</pre><dl>  <dd> return the data Y minimum.</dl><a name="legend(int, int, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="legend"><b>legend</b></a><pre>  public void legend(int x,                     int y,                     <a href="java.lang.String.html#_top_">String</a> text)</pre><dl>  <dd> Define a data legend in the graph window  <dl>    <dt> <b>Parameters:</b>    <dd> x - pixel position of the legend.    <dd> y - pixel position of the legend.    <dd> text - text to display in the legend  </dl></dl><a name="legend(double, double, java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="legend"><b>legend</b></a><pre>  public void legend(double x,                     double y,                     <a href="java.lang.String.html#_top_">String</a> text)</pre><dl>  <dd> Define a data legend in the graph window  <dl>    <dt> <b>Parameters:</b>    <dd> x - data position of the legend.    <dd> y - data position of the legend.    <dd> text - text to display in the legend  </dl></dl><a name="legendFont(java.awt.Font)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="legendFont"><b>legendFont</b></a><pre>  public void legendFont(<a href="java.awt.Font.html#_top_">Font</a> f)</pre><dl>  <dd> Set the font to be used in the legend  <dl>    <dt> <b>Parameters:</b>    <dd> f - font  </dl></dl><a name="legendColor(java.awt.Color)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="legendColor"><b>legendColor</b></a><pre>  public void legendColor(<a href="java.awt.Color.html#_top_">Color</a> c)</pre><dl>  <dd> Set the color for the legend text  <dl>    <dt> <b>Parameters:</b>    <dd> c - color  </dl></dl><a name="dataPoints()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="dataPoints"><b>dataPoints</b></a><pre>  public int dataPoints()</pre><dl>  <dd> Return the number of data points in the DataSet  <dl>    <dt> <b>Returns:</b>    <dd> number of (x,y0 points.  </dl></dl><a name="getPoint(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getPoint"><b>getPoint</b></a><pre>  public double[] getPoint(int index)</pre><dl>  <dd> get the data point at the parsed index. The first (x,y) pairis at index 0.  <dl>    <dt> <b>Parameters:</b>    <dd> index - Data point index    <dt> <b>Returns:</b>    <dd> array containing the (x,y) pair.  </dl></dl><a name="getClosestPoint(double, double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="getClosestPoint"><b>getClosestPoint</b></a><pre>  public double[] getClosestPoint(double x,                                  double y)</pre><dl>  <dd> Return the data point that is closest to the parsed (x,y) position  <dl>    <dt> <b>Parameters:</b>    <dd> y - (x,y) position in data space.    <dt> <b>Returns:</b>    <dd> array containing the closest data point.  </dl></dl><a name="draw_lines(java.awt.Graphics, java.awt.Rectangle)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="draw_lines"><b>draw_lines</b></a><pre>  protected void draw_lines(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,                            <a href="java.awt.Rectangle.html#_top_">Rectangle</a> w)</pre><dl>  <dd> Draw into the data window the straight line segments joining thedata points.  <dl>    <dt> <b>Parameters:</b>    <dd> g - Graphics context    <dd> w - Data window  </dl></dl><a name="inside(double, double)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="inside"><b>inside</b></a><pre>  protected boolean inside(double x,                           double y)</pre><dl>  <dd> Return true if the point (x,y) is inside the allowed data range.</dl><a name="draw_markers(java.awt.Graphics, java.awt.Rectangle)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="draw_markers"><b>draw_markers</b></a><pre>  protected void draw_markers(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,                              <a href="java.awt.Rectangle.html#_top_">Rectangle</a> w)</pre><dl>  <dd> Draw the markers. Only markers inside the specified range will be drawn. Also markers close the edge of the clipping region will be clipped.  <dl>    <dt> <b>Parameters:</b>    <dd> g - Graphics context    <dd> w - data window    <dt> <b>See Also:</b>    <dd> <a href="graph.Markers.html#_top_">Markers</a>  </dl></dl><a name="draw_legend(java.awt.Graphics, java.awt.Rectangle)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="draw_legend"><b>draw_legend</b></a><pre>  protected void draw_legend(<a href="java.awt.Graphics.html#_top_">Graphics</a> g,                             <a href="java.awt.Rectangle.html#_top_">Rectangle</a> w)</pre><dl>  <dd> Draw a legend for this data set  <dl>    <dt> <b>Parameters:</b>    <dd> g - Graphics context    <dd> w - Data Window  </dl></dl><a name="range(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a><a name="range"><b>range</b></a><pre>  protected void range(int stride)</pre><dl>  <dd> Calculate the range of the data. This modifies dxmin,dxmax,dymin,dymaxand xmin,xmax,ymin,ymax</dl><hr><pre><a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-graph.html">This Package</a>  <a href="graph.Contour.html#_top_">Previous</a>  <a href="graph.G2Dint.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -