Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

transpose the graph to the left

$
0
0

Is it possible to transpose the barcharts to the left instead of the right when transposeAxis(true)? Please help Example Code:

import org.gicentre.utils.stat.*;
void setup()
{
  size(300,200);

  barChart = new BarChart(this);
  barChart.setData(new float[] {0.76, 0.24, 0.39, 0.18, 0.20});

  // Scaling
  barChart.setMinValue(0);
  barChart.setMaxValue(1);

  // Axis appearance
  textFont(createFont("Serif",10),10);

  barChart.showValueAxis(true);
  barChart.setValueFormat("#%");
  barChart.setBarLabels(new String[] {"Cynthia","Daniel","Eli",
                                       "Fasil","Gertrude"});
  barChart.showCategoryAxis(true);

  // Bar colours and appearance
  barChart.setBarColour(color(200,80,80,150));
  barChart.setBarGap(4);

  // Bar layout
  barChart.transposeAxes(true);
}
void draw()
{
  background(255);
  barChart.draw(15,15,width-30,height-30);
}

Viewing all articles
Browse latest Browse all 2896

Trending Articles