title: Is there a better way to process these if statements?
body: <p>I'm writing a Java application that plots graphs for min/max/avg values of an accelerometer and gyroscope in their three fields xyz. I would like to be able to plot each factor independently, i.e. maximum acceleration in the X field with the average acceleration in the Z field etc. </p>
  
  <p>I have used radio buttons for min/max/avg and for acceleration/y/z and gyroscopex/y/z. </p>
  
  <p>I also thought about making radio buttons for min/max/avg for each variable but then I would have 18 separate variables.</p>
  
  <p>Here is a snippet of my code:</p>
  
  <pre><code>if (selectionAccelX == 1 &amp;&amp; selectionAccelY == 0 &amp;&amp; selectionAccelZ == 0 &amp;&amp; 
      selectionGyroX == 0 &amp;&amp; selectionGyroY == 0 &amp;&amp; selectionGyroZ == 0 &amp;&amp; 
      selectionXAxis == 0) {
  
      Graphing graphing = new Graphing("Average AccelerationX");
      graphing.setAccelerationX(avgAccXSec);
      graphing.displayGraphing();
      graphing.pack();
      RefineryUtilities.centerFrameOnScreen(graphing);
      graphing.setVisible(true);
  }
  </code></pre>
  
  <p>Is there an easier way to go about this?</p>