title: can't seem to get the correct coordinates to display in the right way
body: <p>I'm trying to get the map to paint the set scaleX left side by 180 to 360 longitude and the right side 0 to 180 but I'm abit unsure on a way to make convert these coordinates around as I can't add extra parameters to filRect as I'm only allowed 4 parameters. If I set ScaleX to 0, 360 I get the map the wrong way round. I have 2 classes Plot and Plotmap</p>
  
  <p>My plot class</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  
  public class Plot extends JComponent {
      int width = 1200, height = 1200;
      double xmin = 0, xmax = 1, ymin = 0, ymax = 1, lmin = 0, lmax = 180;
  
          public int scaleX(double x){
              return (int) (width * (x - xmin) / (xmax + xmin));
          }
          public int scaleY ( double y){
              return (int) (height * (ymin - y) / (ymax - ymin) + height);
          }
  
          public void setScaleX ( double min, double max){
              xmin = min;
              xmax = max;
          }
          public void setScaleY ( double min, double max){
              ymin = min;
              ymax = max;
          }
  
      }
  
  </code></pre>
  
  <p>My plot map class</p>
  
  <pre><code>
  public class Plotmap extends Plot {
      Earth e;
      int point = 20;
      public Plotmap(String filename) throws FileNotFoundException {
          e = new Earth();
          e.readDataArray(filename);
  
          setScaleX(0, 360);
          setScaleY(-90, 90);
          //setScaleXR(180, 360);
          //setScaleYR(-90, 90);
      }
  
      @Override
      public void paintComponent(Graphics g) {
          Graphics2D g2d = (Graphics2D) g;
  
          this.width = getWidth();
          this.height = getHeight();
          for (int i = 0; i &lt; e.array.length; i++) {
              double longitude = e.array[i][0];
                  double latitude = e.array[i][1];
                  double alti = e.array[i][2];
  
                  if (alti &lt; 0) 
                      g2d.setColor(new Color(0, 90, 139));
                  else
                      g2d.setColor(new Color(0, 0, 139));
                   g.fillRect(scaleX(longitude), scaleY(latitude), point, point);
  
  
  }
  }
  }
  
  </code></pre>