Codota Logo
PlotPanel.addPoints
Code IndexAdd Codota to your IDE (free)

How to use
addPoints
method
in
edu.mines.jtk.mosaic.PlotPanel

Best Java code snippets using edu.mines.jtk.mosaic.PlotPanel.addPoints (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
DateTime d =
  • Codota Iconnew DateTime()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseDateTime(text)
  • Codota IconObject instant;new DateTime(instant)
  • Smart code suggestions by Codota
}
origin: dhale/jtk

/**
 * Adds a view of points (x1,x2) for a sampled function x2(x1).
 * @param s1 the sampling of x1 coordinates.
 * @param x2 array of x2 coordinates.
 * @return the points view.
 */
public PointsView addPoints(Sampling s1, float[] x2) {
 return addPoints(0,0,s1,x2);
}
origin: dhale/jtk

/**
 * Adds a points view of arrays x1, x2 and x3 of point (x1,x2,x3) coordinates.
 * @param x1 array of x1 coordinates.
 * @param x2 array of x2 coordinates.
 * @param x3 array of x3 coordinates.
 * @return the points view.
 */
public PointsView addPoints(float[] x1, float[] x2, float[] x3) {
 return addPoints(0,0,x1,x2,x3);
}
origin: dhale/jtk

/**
 * Adds a view 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 coordinates.
 * @param x2 array of arrays of x2 coordinates.
 * @return a points view.
 */
public PointsView addPoints(float[][] x1, float[][] x2) {
 return addPoints(0,0,x1,x2);
}
origin: dhale/jtk

/**
 * Adds a points view of (x1,x2) with specified x2 coordinates.
 * The corresponding coordinates x1 are assumed to be 0, 1, 2, ....
 * @param x2 array of x2 coordinates.
 * @return the points view.
 */
public PointsView addPoints(float[] x2) {
 return addPoints(0,0,x2);
}
origin: dhale/jtk

/**
 * Adds a points view of the arrays x1 and x2 of point (x1,x2) coordinates.
 * @param x1 array of x1 coordinates.
 * @param x2 array of x2 coordinates.
 * @return the points view.
 */
public PointsView addPoints(float[] x1, float[] x2) {
 return addPoints(0,0,x1,x2);
}
origin: dhale/jtk

/**
 * Adds a points view of a sampled function f(x).
 * @param s the sampling of the x coordinate.
 * @param f array of sampled function values f(x).
 * @return the points view.
 */
public PointsView addPoints(Sampling s, float[] f) {
 return _panel.addPoints(s,f);
}
origin: dhale/jtk

/**
 * Adds a points view of specified values f(x).
 * Uses default sampling of x = 0, 1, 2, ....
 * @param f array of sampled function values f(x).
 * @return the points view.
 */
public PointsView addPoints(float[] f) {
 return _panel.addPoints(f);
}
origin: dhale/jtk

/**
 * Adds a points view of specified values (x,y).
 * @param x array of x coordinates.
 * @param y array of y coordinates.
 * @return the points view.
 */
public PointsView addPoints(float[] x, float[] y) {
 return _panel.addPoints(x,y);
}
origin: dhale/jtk

private void updatePolesView() {
 int np = _poles.size();
 float[] xp = new float[np];
 float[] yp = new float[np];
 for (int ip=0; ip<np; ++ip) {
  Cdouble p = _poles.get(ip);
  xp[ip] = (float)p.r;
  yp[ip] = (float)p.i;
 }
 if (_polesView==null) {
  _polesView = _plotPanel.addPoints(xp,yp);
  _polesView.setMarkStyle(PointsView.Mark.CROSS);
  _polesView.setLineStyle(PointsView.Line.NONE);
 } else {
  _polesView.set(xp,yp);
 }
}
origin: dhale/jtk

private void updateZerosView() {
 int nz = _zeros.size();
 float[] xz = new float[nz];
 float[] yz = new float[nz];
 for (int iz=0; iz<nz; ++iz) {
  Cdouble z = _zeros.get(iz);
  xz[iz] = (float)z.r;
  yz[iz] = (float)z.i;
 }
 if (_zerosView==null) {
  _zerosView = _plotPanel.addPoints(xz,yz);
  _zerosView.setMarkStyle(PointsView.Mark.HOLLOW_CIRCLE);
  _zerosView.setLineStyle(PointsView.Line.NONE);
 } else {
  _zerosView.set(xz,yz);
 }
}
origin: dhale/jtk

public static void main(String args[]) {
 System.out.println("LogAxisPlotDemo2");
 int n = 1000;
 float X = 300;
 float[] x = ArrayMath.rampfloat(0.0f,X / n,n);
 float[] f = new float[n];
 for (int i = 0; i < n; ++i) {
  f[i] = pow(1.5f * x[i],2);
 }
 // new plot
 PlotPanel plot = new PlotPanel(2,2);
 pv1 = plot.addPoints(0,0,x,f);
 pv2 = plot.addPoints(0,1,x,f);
 pv3 = plot.addPoints(1,0,x,f);
 pv4 = plot.addPoints(1,1,x,f);
 
 
 // frame setup
 plot.setVisible(true);
 PlotFrame frame = new PlotFrame(plot);
 frame.setSize(800,500);
 frame.add(makeScaleOptionPanel(),BorderLayout.EAST);
 frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE);
 frame.setVisible(true);
}

origin: dhale/jtk

PointsView pv1 = plot.addPoints(0,0,x1,f1);
pv1.setLineColor(Color.BLUE);
pv1.setScales(AxisScale.LOG10);
PointsView pv2 = plot.addPoints(0,0,x2,f2);
pv2.setLineColor(Color.RED);
pv2.setScales(AxisScale.LOG10);
origin: dhale/jtk

_circleView = _plotPanel.addPoints(circlePoints[0],circlePoints[1]);
_circleView.setLineColor(Color.RED);
origin: dhale/jtk

private void updateViews() {
 Real1 h = computeImpulseResponse();
 Real1[] ap = computeAmplitudeAndPhaseResponses();
 Real1 a = ap[0];
 Real1 p = ap[1];
 if (_hView==null) {
  _hView = _plotPanelH.addSequence(h.getSampling(),h.getValues());
  _aView = _plotPanelAP.addPoints(0,0,a.getSampling(),a.getValues());
  _pView = _plotPanelAP.addPoints(1,0,p.getSampling(),p.getValues());
 } else {
  _hView.set(h.getSampling(),h.getValues());
  _aView.set(a.getSampling(),a.getValues());
  _pView.set(p.getSampling(),p.getValues());
 }
}
origin: dhale/jtk

 private static void demo1() {
  int n = 50;
  float[] x1 = randfloat(n);
  float[] x2 = randfloat(n);
  float[] x3 = randfloat(n);

  PlotPanel panel = new PlotPanel(1,1);
  panel.setLimits(-0.1,-0.1,1.1,1.1);
  PointsView pv = panel.addPoints(x1,x2,x3);
  pv.setLineStyle(PointsView.Line.NONE);
  pv.setMarkStyle(PointsView.Mark.FILLED_CIRCLE);
  pv.setTextFormat("%4.2f");
  PlotFrame frame = new PlotFrame(panel);
  frame.setSize(800,800);
  frame.setDefaultCloseOperation(PlotFrame.EXIT_ON_CLOSE);
  frame.setVisible(true);
  //frame.paintToPng(300,6,"junk.png");
 }
}
origin: dhale/jtk

public PlotFrameDemo() {
 float[] x = rampfloat(0.0f,4.0f*FLT_PI/200.0f,201);
 float[] s = sin(x);
 _plotPanel = new PlotPanel();
 _plotPanel.setTitle("The sine function");
 _plotPanel.setHLabel("x");
 _plotPanel.setVLabel("sin(x)");
 _gridView = _plotPanel.addGrid();
 _pointsView = _plotPanel.addPoints(x,s);
 _pointsView.setStyle("r-o");
 _plotFrame = new PlotFrame(_plotPanel);
 _plotFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 _plotFrame.setVisible(true);
 _plotFrame.add(
  new Label("In either plot or axes, click-drag to zoom, click to unzoom."),
  BorderLayout.NORTH);
}
origin: dhale/jtk

pxv1.setColorModel(ColorMap.JET);
PointsView ptv0 = panel.addPoints(0,0,x1,x2);
PointsView ptv1 = panel.addPoints(0,1,x1,x2);
ptv0.setStyle("r--.");
ptv1.setStyle("k-o");
edu.mines.jtk.mosaicPlotPaneladdPoints

Javadoc

Adds a view of points (x1,x2) for a sampled function x2(x1).

Popular methods of PlotPanel

  • <init>
    Constructs a new plot panel with a mosaic of one tile.
  • addColorBar
    Adds the color bar with specified label.
  • addContours
    Adds a contours view with the function f(x1,x2). Function f(x1,x2) assumed to have uniform sampling.
  • addGrid
    Adds a grid view with specified parameters string. For the format of the parameters string, see edu.
  • addPixels
    Adds a pixels view of the specified sampled function f(x1,x2). Assumes zero first sample values and
  • addSequence
    Adds a sequence view with specified values f(x). Uses default sampling of x = 0, 1, 2, ....
  • getMosaic
    Gets the mosaic. The mosaic contains one or more tiles.
  • remove
  • setHLabel
    Sets the label for the horizontal axis.
  • setHLimits
    Sets limits for the horizontal axis in the specified column. By default, limits are computed automat
  • setLimits
    Sets limits for the both horizontal and vertical axes. By default, limits are computed automatically
  • setLimitsDefault
    Sets default limits for horizontal and vertical axes. This method may be used to restore default lim
  • setLimits,
  • setLimitsDefault,
  • setTitle,
  • setVLabel,
  • setVLimits,
  • add,
  • addBars,
  • addBarsView,
  • addContoursView

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • requestLocationUpdates (LocationManager)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now