congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Plotter
Code IndexAdd Tabnine to your IDE (free)

How to use
Plotter
in
us.ihmc.plotting

Best Java code snippets using us.ihmc.plotting.Plotter (Showing top 20 results out of 315)

origin: us.ihmc/ihmc-manipulation-planning

public CTNodeVisualizer(String ctaskName, int configurationIndex, boolean enabled)
{
 this.ctaskName = ctaskName;
 this.plotter = new Plotter();
 this.configurationIndex = configurationIndex;
 /*
  * zoom- always normalized.
  */
 plotter.setPreferredSize(700, 700);
 plotter.setViewRange(1.5);
 plotter.setXYZoomEnabled(true);
 plotter.setShowLabels(true);
 plotter.setFocusPointX(0.5);
 plotter.setFocusPointY(0.5);
 this.enabled = enabled;
}
origin: us.ihmc/simulation-construction-set-tools-test

private void displayPolygons(PlotterPanel plotterpanel, ArrayList<PolygonArtifact> polygonArtifacts)
{
 if (plotterpanel == null)
   return;
 for (int i = 0; i < polygonArtifacts.size(); i++)
 {
   plotterpanel.getPlotter().addArtifact(polygonArtifacts.get(i));
   try
   {
    Thread.sleep(100);
   }
   catch (Exception ex)
   {
    ex.printStackTrace();
   }
 }
}
origin: us.ihmc/ihmc-footstep-planning-test

private static void showPlotterAndSleep(ArtifactList artifacts)
{
 Plotter plotter = new Plotter();
 plotter.setViewRange(2.0);
 artifacts.setVisible(true);
 JFrame frame = new JFrame("PolygonWigglingTest");
 Dimension preferredSize = new Dimension(600, 600);
 frame.setPreferredSize(preferredSize);
 frame.add(plotter.getJPanel(), BorderLayout.CENTER);
 frame.setSize(preferredSize);
 frame.setVisible(true);
 artifacts.addArtifactsToPlotter(plotter);
 ThreadTools.sleepForever();
}
origin: us.ihmc/ihmc-swing-plotting

public NetworkedPlotter()
{
  plotter = new Plotter(PlotterColors.javaFXStyle(), true);
  plotter.setXYZoomEnabled(true);
  plotter.setViewRangeX(1000.0);
  plotter.setViewRangeY(1000.0);
  qualitativeColors = new QualitativeColors();
  colorIndex = -1;
  id = 0;
  adjustingViewRangeMax = Optional.empty();
  adjustingViewRangeMin = Optional.empty();
  incrementSeries();
  plotter.showInNewWindow("Networked Plotter", false);
}
origin: us.ihmc/ihmc-common-walking-control-modules-test

  private void plotValues(List<Point2D> points, Color color)
  {
   Plotter p = new Plotter();
   int index = 0;
   for (Point2D point : points)
   {
     p.createAndAddPointArtifact("Point" + (index++), point, color);
   }

   JFrame f = new JFrame("Plotter Test");
   f.addWindowListener(new WindowAdapter()
   {
     public void windowClosing(WindowEvent e)
     {
      System.exit(0);
     }
   });

   f.getContentPane().add(p.getJPanel(), BorderLayout.CENTER);
   f.pack();
   f.setVisible(true);
  }
}
origin: us.ihmc/ihmc-common-walking-control-modules-test

String name = matcher.group();
Plotter plotter = new Plotter();
plotter.setViewRange(range);
plotter.setFocusPointX(focus.getX());
plotter.setFocusPointY(focus.getY());
plotter.addArtifactsChangedListener(plotterShowHideMenu);
frame.add(plotter.getJPanel(), BorderLayout.CENTER);
origin: us.ihmc/ihmc-whole-body-controller

private static void showPlotter(YoGraphicsListRegistry yoGraphicsListRegistry, String windowName)
 Plotter plotter = new Plotter();
 plotter.setViewRange(viewRange);
 plotter.addArtifactsChangedListener(plotterShowHideMenu);
 frame.add(plotter.getJPanel(), BorderLayout.CENTER);
origin: us.ihmc/simulation-construction-set-test

Plotter plotter = new Plotter();
plotter.setPreferredSize(800, 600);
plotter.setViewRange(10.0);
plotter.setXYZoomEnabled(true);
plotter.setRotationEnabled(true);
plotter.setShowLabels(true);
plotter.addArtifact(new LineArtifact("01", new Point2D(0, 0), new Point2D(1, 1)));
plotter.addArtifact(new LineArtifact("02", new Point2D(1, 1), new Point2D(2, 0)));
plotter.addArtifact(new LineArtifact("03", new Point2D(2, 0), new Point2D(3, 1)));
plotter.addArtifact(new YoArtifactOval("circle", center, radii, Color.RED));
plotter.addArtifact(new YoArtifactLineSegment2d("lineSegment1", lineSegment, Color.DARK_GRAY, 0.1, 0.1));
plotter.addArtifact(new YoArtifactLine2d("line1", line, Color.GREEN));
plotter.addArtifact(new YoArtifactPolygon("emptyPolygon1", polygon, Color.MAGENTA, false)); 
plotter.addArtifact(new YoArtifactPolygon("onePointPolygon", polygon2, Color.MAGENTA, false)); 
plotter.addArtifact(new YoArtifactPolygon("twoPointPolygon", polygon3, Color.BLUE, true)); 
plotter.addArtifact(new YoArtifactPosition("pointZ", pointZ, GraphicType.BALL, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point4", point4, GraphicType.BALL_WITH_CROSS, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point5", point5, GraphicType.BALL_WITH_ROTATED_CROSS, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point6", point6, GraphicType.CROSS, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point7", point7, GraphicType.DIAMOND, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point8", point8, GraphicType.DIAMOND_WITH_CROSS, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point9", point9, GraphicType.ELLIPSOID, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point10", point10, GraphicType.ROTATED_CROSS, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point11", point11, GraphicType.SOLID_BALL, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point12", point12, GraphicType.SQUARE, Color.DARK_GRAY, 0.1)); 
plotter.addArtifact(new YoArtifactPosition("point13", point13, GraphicType.SQUARE_WITH_CROSS, Color.DARK_GRAY, 0.1)); 
origin: us.ihmc/ihmc-avatar-interfaces

boolPlotter.setFocusPointX((double) 320);
boolPlotter.setFocusPointY((double) 80);
boolPlotter.setViewRange(200);
origin: us.ihmc/ihmc-avatar-interfaces

 plotters.get(nodeIndex).addArtifact(lineArtifact);
nodeArtifact.setColor(color);
plotters.get(nodeIndex).addArtifact(nodeArtifact);
plotters.get(nodeIndex).update();
origin: us.ihmc/ihmc-swing-plotting

public PlotterPanel()
{
 plotter = new Plotter();
 GridBagConstraints gridBagConstraints = new GridBagConstraints();
 setLayout(new GridBagLayout());
 gridBagConstraints.gridx = 0;
 gridBagConstraints.gridy = 0;
 gridBagConstraints.fill = GridBagConstraints.BOTH;
 gridBagConstraints.gridwidth = 5;
 gridBagConstraints.gridheight = 5;
 gridBagConstraints.weightx = 1;
 gridBagConstraints.weighty = 1;
 add(plotter.getJPanel(), gridBagConstraints);
}
origin: us.ihmc/ihmc-common-walking-control-modules-test

private void visualizeInvertedPendulum(double length1, double length2, ArrayList<Point2D> hipPositions, List<double[]> jointAngles)
 Plotter p = new Plotter();
 Point2D hipPosition = new Point2D();
 Point2D kneePosition = new Point2D();
   anklePosition.setY(kneePosition.getY() - length2 * Math.cos(jointAngleSet[0] + jointAngleSet[1]));
   p.createAndAddLineArtifact("Femur" + index, new Line2D(hipPosition, kneePosition), Color.black);
   p.createAndAddLineArtifact("Shin" + index, new Line2D(kneePosition, anklePosition), Color.gray);
   p.createAndAddPointArtifact("Ankle" + index, new Point2D(anklePosition), Color.blue);
 f.getContentPane().add(p.getJPanel(), BorderLayout.CENTER);
 f.pack();
 f.setVisible(true);
origin: us.ihmc/ihmc-swing-plotting

 plotter.setFocusPointX(point2D.getX());
 plotter.setFocusPointY(point2D.getY());
 return;
plotter.setFocusPointX(adjustingViewRangeMin.get().getX() + ((adjustingViewRangeMax.get().getX() - adjustingViewRangeMin.get().getX()) / 2.0));
plotter.setFocusPointY(adjustingViewRangeMin.get().getY() + ((adjustingViewRangeMax.get().getY() - adjustingViewRangeMin.get().getY()) / 2.0));
plotter.setViewRangeX((adjustingViewRangeMax.get().getX() - adjustingViewRangeMin.get().getX()) * 1.10);
plotter.setViewRangeY((adjustingViewRangeMax.get().getY() - adjustingViewRangeMin.get().getY()) * 1.10);
origin: us.ihmc/ihmc-system-identification

  public static Plotter createPlotter(String frameTitle)
  {
   PlotterPanel plotterPanel = new PlotterPanel();
   Plotter plotter = plotterPanel.getPlotter();
   plotter.setViewRange(1.0);
   if (frameTitle == null)
   {
     frameTitle = "Plotter Panel " + plotterPanelId;
   }
   JFrame f = new JFrame(frameTitle);
   f.getContentPane().add(new JScrollPane(plotterPanel), BorderLayout.CENTER);
   f.pack();
   f.setVisible(true);
   return plotter;
  }
}
origin: us.ihmc/Plotting

public PlotterLegendPanel createPlotterLegendPanel()
{
 PlotterLegendPanel plotterLegendPanel = new PlotterLegendPanel(plotter2dAdapter);
 addArtifactsChangedListener(plotterLegendPanel);
 return plotterLegendPanel;
}
origin: us.ihmc/ihmc-manipulation-planning

public void initialize()
{
 updateCnt = 0;
 if (enabled)
   plotter.showInNewWindow(ctaskName, false);
}
origin: us.ihmc/Plotting

 @Override
 public void itemStateChanged(ItemEvent e)
 {
   String name = checkBox.getText();
   boolean visible = checkBox.isSelected();
   artifactList.get(name).setVisible(visible);
   plotter.update();
 }
});
origin: us.ihmc/ihmc-path-planning-test

public static void showPlotter(YoGraphicsListRegistry yoGraphicsListRegistry, String windowName)
 Plotter plotter = new Plotter();
 plotter.setViewRange(2.0);
 plotter.addArtifactsChangedListener(plotterShowHideMenu);
 frame.add(plotter.getJPanel(), BorderLayout.CENTER);
origin: us.ihmc/DarpaRoboticsChallenge

boolPlotter.setFocusPointX((double) 320);
boolPlotter.setFocusPointY((double) 80);
boolPlotter.setViewRange(200);
origin: us.ihmc/ihmc-manipulation-planning

public void updateVisualizer(CTTaskNode newNode)
{
 String prefix = "wholenodes_" + configurationIndex + "" + updateCnt;
 if (newNode.getValidity())
 {
   if (newNode.getParentNode() != null)
   {
    CTTaskNode parentNode = newNode.getParentNode();
    LineArtifact lineArtifact = new LineArtifact(prefix + "_line",
                           new Point2D(parentNode.getNormalizedNodeData(0), parentNode.getNormalizedNodeData(configurationIndex)),
                           new Point2D(newNode.getNormalizedNodeData(0), newNode.getNormalizedNodeData(configurationIndex)));
    lineArtifact.setColor(Color.blue);
    plotter.addArtifact(lineArtifact);
   }
   CircleArtifact nodeArtifact = new CircleArtifact(prefix + "_valid", newNode.getNormalizedNodeData(0),
                           newNode.getNormalizedNodeData(configurationIndex), 0.0075, true);
   nodeArtifact.setColor(Color.blue);
   plotter.addArtifact(nodeArtifact);
 }
 else
 {
   CircleArtifact nodeArtifact = new CircleArtifact(prefix + "_invalid", newNode.getNormalizedNodeData(0),
                           newNode.getNormalizedNodeData(configurationIndex), 0.0075, true);
   nodeArtifact.setColor(Color.red);
   plotter.addArtifact(nodeArtifact);
 }
 plotter.update();
 updateCnt++;
}
us.ihmc.plottingPlotter

Javadoc

TODO Deprecate archaic methods TODO Factor out artifacts. TODO Fix color field in Artifact TODO Fix zoom in for vector

Most used methods

  • setViewRange
    Specify amount of meters that occupy view in X and Y.
  • <init>
  • addArtifact
  • getJPanel
  • setFocusPointX
  • setFocusPointY
  • addArtifactsChangedListener
  • showInNewWindow
  • setXYZoomEnabled
  • update
  • setPreferredSize
  • setShowLabels
  • setPreferredSize,
  • setShowLabels,
  • calculateGridSizePixels,
  • centerOnFocusPoint,
  • createAndAttachPlotterLegendPanel,
  • forAllArtifacts,
  • getArtifacts,
  • getPlotter2DAdapter,
  • getPlotterHeightPixels,
  • getPlotterWidthPixels

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • putExtra (Intent)
  • runOnUiThread (Activity)
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • ImageIO (javax.imageio)
  • JOptionPane (javax.swing)
  • JTable (javax.swing)
  • Top 15 Vim Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now