Examples of Plot


Examples of com.forgeessentials.economy.plots.Plot

    @Override
    public void processCommandPlayer(EntityPlayer buyer, String[] args)
    {
        if (args.length == 3)
        {
            Plot plot = PlotManager.plotList.get(args[0]);
            EntityPlayer seller = UserIdent.getPlayerByUuid(plot.getOwner());
            OutputHandler.chatNotification(seller, "Player " + buyer.getDisplayName() + " offered to purchase plot " + plot.getName() + " for " + args[1]
                    + ". Type /sellplot <plotName> yes to accept, /sellplot <plotName> no to deny. This offer will expire in " + PlotManager.timeout + " seconds.");
            PlotManager.pendingOffers.put(plot.getName(), new Offer(plot, buyer, seller, Integer.parseInt(args[1])));
        }
        else{
            OutputHandler.chatError(buyer, "Incorrect syntax. Try this instead: <plotName> <amount>");
        }
View Full Code Here

Examples of com.googlecode.charts4j.Plot

    Data countData = DataUtil.scaleWithinRange(0, maxPlusOne, Longs.asList(workerCallCounts));

    // TODO(user): Rather than returning charts from both servers, let's just
    // do it on the client's end.
    Plot countPlot = Plots.newBarChartPlot(countData);
    BarChart countChart = GCharts.newBarChart(countPlot);
    countChart.addYAxisLabels(AxisLabelsFactory.newNumericRangeAxisLabels(0, maxPlusOne));
    countChart.addXAxisLabels(AxisLabelsFactory.newAxisLabels(countLabels));
    countChart.setSize(getChartWidth(workerCallCounts.length), 200);
    countChart.setBarWidth(BarChart.AUTO_RESIZE);
View Full Code Here

Examples of com.mockturtlesolutions.snifflib.stats.Plot

    }
    //Make an overlay plot of the cummulative sum of Conc_i*Volume_Added_i versus pH_i
    int col=0;
    DblMatrix cv_total = new DblMatrix(0.0);
    DblMatrix v_total = new DblMatrix(0.0);
    Plot plot = new Plot(data);
    pHtoolsPrefs prefs = new pHtoolsPrefs();
    prefs.initialize();
   
    plot.setAxesPreferences(prefs);
    plot.setFigurePreferences(prefs);
    plot.setFigurePreferences(prefs);
    plot.setLineSegmentRendererPreferences(prefs);
    plot.setLegendPreferences(prefs);
   
    plot.setOverlay(true);
   
    boolean NANSENCOUNTERED = false;
    int NANLINE = 0;
    String NANSUB = "";
   
   
   
    for (int ss=0;ss<subsamples.size();ss++)
    {
   
      String ssid = (String)subsamples.get(ss);
      cv_total = new DblMatrix(0.0);
      v_total = new DblMatrix(new Double(this.parent.getInitialVolume(ssid)));
     
      data.addColumn("pH"+ssid,Double.class);
      data.addColumn("CV"+ssid,Double.class);
      plot.addResponseVariable("CV"+ssid);
      plot.addPredictorVariable("pH"+ssid);
     
      Vector observations = this.parent.getTitrationObservationNumbers(ssid);
      for (int obs=0;obs<observations.size();obs++)
      {
       
        String obsnum = (String)observations.get(obs);
       
        String val;
        Double nval;
       
        val = this.parent.getTitrantConcentration(ssid,obsnum);
        try
        {
          nval = new Double(val);
        }
        catch(Exception err)
        {
          NANSENCOUNTERED = true;
          nval = new Double(Double.NaN);
        }
       
        Double conc = nval;
       
        val = this.parent.getVolumeAdded(ssid,obsnum);
        try
        {
          nval = new Double(val);
        }
        catch(Exception err)
        {
          NANSENCOUNTERED = true;
          nval = new Double(Double.NaN);
        }
       
       
        Double volAdded = nval;
       
        cv_total = cv_total.plus(conc.doubleValue()*volAdded.doubleValue());
        v_total = v_total.plus(volAdded.doubleValue());
        //System.out.println("conc"+conc);
        //System.out.println("volAdded"+volAdded);
        //cv_total.show("cv_total","###.##E0");
       
        val = this.parent.getpH(ssid,obsnum);
        try
        {
          nval = new Double(val);
        }
        catch (Exception err)
        {
          NANSENCOUNTERED = true;
          NANLINE = obs;
          NANSUB = ssid;
         
          nval = new Double(Double.NaN);
        }
       
        Double pH = nval;
        //System.out.println("pH"+pH);
        data.setValueAt(pH,obs,col);
        data.setValueAt(cv_total.divideBy(v_total).getDoubleAt(0),obs,col+1)
      }
     
      col = col+2;//Moving to the next subsample.
    }
   
    try
    {
      this.plotPanel.setPlot(plot);
    }
    catch (Exception err)
    {
      throw new RuntimeException("Problem updating plot in TitrationPlotPanel",err);
    }
   
    SLAxes ax = plot.getAxes();
    ax.setYLabel("Total Moles Titrant Added");
    ax.setXLabel("pH")
    //plotstuff.setVisible(true);
    this.plotPanel.setVisible(true);
    this.parent.repaint();
View Full Code Here

Examples of com.positive.charts.plot.Plot

    ValueAxis result = null;
    if (index < this.domainAxes.size()) {
      result = (ValueAxis) this.domainAxes.get(index);
    }
    if (result == null) {
      final Plot parent = this.getParent();
      if (parent instanceof XYPlot) {
        final XYPlot xy = (XYPlot) parent;
        result = xy.getDomainAxis(index);
      }
    }
View Full Code Here

Examples of com.twosigma.beaker.chart.xychart.Plot

      } else if (obj instanceof OutputContainer) {
        jgen.writeObject(obj);
      } else if (obj instanceof XYChart) {
        jgen.writeObject((XYChart) obj);
      } else if (obj instanceof XYGraphics) {
        jgen.writeObject(new Plot().add((XYGraphics) obj));
      } else if (obj instanceof CombinedPlot) {
        jgen.writeObject((CombinedPlot) obj);
      } else {
        jgen.writeObject(obj.toString());
      }
View Full Code Here

Examples of eas.math.gnuplot2.JGnuplot.Plot

    prepPlot();
    return rtn;
  }

  public void prepPlot() {
    plot1 = new Plot("plot1") {//No need to declare public/protected/private for these fields.
      //String terminal, output, xrange, yrange, zrange;
      //Quotation inside is necessary for xlabel and other fields cause you could add more config code
      String xlabel = "'x axis' textcolor rgbcolor 'dark-red'", ylabel = "'y axis'", extra = "set key top left";
    };
    //DataTableSet 1 2d add data one by one
    DataTableSet dts1 = plot1.addNewDataTableSet("DataTableSet 2d");//use null to avoid the output of figure title for this dataset.
    DataTable dt1 = dts1.addNewDataTable("x", 2);
    DataTable dt2 = dts1.addNewDataTable("2x", 2);
    DataTable dt3 = dts1.addNewDataTable("3x", 2);
    DataTable dt4 = dts1.addNewDataTable("4x", 2);
    DataTable dt5 = dts1.addNewDataTable("5x", 2);
    DataTable dt6 = dts1.addNewDataTable("6x", 2);
    DataTable dt7 = dts1.addNewDataTable("7x", 2);
    DataTable dt8 = dts1.addNewDataTable("8x", 2);
    DataTable dt9 = dts1.addNewDataTable("9x", 2);
    DataTable dt10 = dts1.addNewDataTable("10x", 2);
    for (int i = 0; i < 5; i++) {
      dt1.add(i, i);
      dt2.add(i, 2 * i);
      dt3.add(i, 3 * i);
      dt4.add(i, 4 * i);
      dt5.add(i, 5 * i);
      dt6.add(i, 6 * i);
      dt7.add(i, 7 * i);
      dt8.add(i, 8 * i);
      dt9.add(i, 9 * i);
      dt10.add(i, 10 * i);
    }
    //DataTableSet 2 3d add data using prepared lists
    DataTableSet dts2 = plot1.addNewDataTableSet("DataTableSet 3d");
    List x = new ArrayList(), y = new ArrayList(), z1 = new ArrayList(), z2 = new ArrayList();
    for (double i = -2; i <= 2; i += 0.5) {
      for (double j = -2; j <= 2; j += 0.5) {
        x.add(i);
        y.add(j);
        z1.add(i * i + j * j);
        z2.add(4 + i * i + j * j);
      }
    }
    dts2.addNewDataTable("x^2+y^2", x, y, z1);
    dts2.addNewDataTable("4+x^2+y^2", x, y, z2);
    DataTableSet dts3 = dts1;
    plot1.add(dts3);

    plot2 = new Plot("plot2") {
      String zlabel = "'z axis'";
    };
    plot2.add(dts2);
  }
View Full Code Here

Examples of net.opentsdb.graph.Plot

        tsdbquery.setEndTime(end_time);
      } catch (IllegalArgumentException e) {
        throw new BadRequestException("end time: " + e.getMessage());
      }
    }
    final Plot plot = new Plot(start_time, end_time,
          DateTime.timezones.get(query.getQueryStringParam("tz")));
    setPlotDimensions(query, plot);
    setPlotParams(query, plot);
    final int nqueries = tsdbqueries.length;
    @SuppressWarnings("unchecked")
    final HashSet<String>[] aggregated_tags = new HashSet[nqueries];
    int npoints = 0;
    for (int i = 0; i < nqueries; i++) {
      try // execute the TSDB query!
        // XXX This is slow and will block Netty.  TODO(tsuna): Don't block.
        // TODO(tsuna): Optimization: run each query in parallel.
        final DataPoints[] series = tsdbqueries[i].run();
        for (final DataPoints datapoints : series) {
          plot.add(datapoints, options.get(i));
          aggregated_tags[i] = new HashSet<String>();
          aggregated_tags[i].addAll(datapoints.getAggregatedTags());
          npoints += datapoints.aggregatedSize();
        }
      } catch (RuntimeException e) {
View Full Code Here

Examples of org.eclipse.birt.chart.model.layout.Plot

  cwa3DLine.setType(title); //$NON-NLS-1$
  cwa3DLine.setSubType("Overlay"); //$NON-NLS-1$

  // Plot
  cwa3DLine.getBlock().setBackground(ColorDefinitionImpl.WHITE());
  Plot p = cwa3DLine.getPlot();
  p.getClientArea().setBackground(ColorDefinitionImpl.create(255, 255, 225));

  // Title
  cwa3DLine.getTitle().getLabel().getCaption().setValue(title);//$NON-NLS-1$
  return cwa3DLine;
}
View Full Code Here

Examples of org.jfree.chart.plot.Plot

    return svgImage;
  }

 
  public void updateSettings(JFreeChart chart, ChartConfig chartConfig){
    Plot plot = chart.getPlot();
   
    Visibility   visibility   = chartConfig.getVisibility();
    Colors     colors     = chartConfig.getColors();
   
    // Chart level visible items
    chart.setBorderVisible(visibility.isBorder());
    plot.setOutlineVisible(visibility.isOutline());
   
    // chart level colors
    final Color  BACKGROUND  = new Color(colors.getBg());
    plot.setBackgroundPaint(BACKGROUND);
    chart.setBackgroundPaint(BACKGROUND);
   
    // Chart level title
    if(chart.getTitle() != null){
      TextTitle title = chart.getTitle();
      title.setVisible(visibility.isTitle());
      title.setBackgroundPaint(new Color(colors.getTitleBg()));
      title.setPaint(new Color(colors.getTitle()));
      title.setExpandToFitSpace(true);
    }
   
    // In case of multiple plot read and update child level chart
    if(plot instanceof MultiplePiePlot){
      MultiplePiePlot multiplePiePlot = (MultiplePiePlot)plot;
      chart  = multiplePiePlot.getPieChart();
      plot   = chart.getPlot();
     
      chart.setBorderVisible(visibility.isBorder());
      plot.setOutlineVisible(visibility.isOutline());
     
      chart.setBackgroundPaint(BACKGROUND);
      plot.setBackgroundPaint(BACKGROUND);
    }
   
    if(plot instanceof CategoryPlot){
      CategoryPlot   categoryPlot   = (CategoryPlot)chart.getPlot();
      categoryPlot.setRangeGridlinesVisible(visibility.isRangeGridLines());
View Full Code Here

Examples of org.jfree.chart.plot.Plot

  protected void configureChart(final JFreeChart chart)
  {
    super.configureChart(chart);

    final Plot plot = chart.getPlot();
    final PiePlot pp = (PiePlot) plot;
    final PieDataset pieDS = pp.getDataset();
    pp.setDirection(rotationClockwise ? Rotation.CLOCKWISE : Rotation.ANTICLOCKWISE);
    if ((explodeSegment != null) && (explodePct != null))
    {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.