<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Tagged with # - Processing 2.x and 3.x Forum</title>
      <link>https://forum.processing.org/two/discussions/tagged/feed.rss?Tag=%23</link>
      <pubDate>Sun, 08 Aug 2021 19:20:22 +0000</pubDate>
         <description>Tagged with # - Processing 2.x and 3.x Forum</description>
   <language>en-CA</language>
   <atom:link href="/two/discussions/tagged%23/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Having trouble with my array</title>
      <link>https://forum.processing.org/two/discussion/9883/having-trouble-with-my-array</link>
      <pubDate>Mon, 16 Mar 2015 16:02:15 +0000</pubDate>
      <dc:creator>Nadarchick</dc:creator>
      <guid isPermaLink="false">9883@/two/discussions</guid>
      <description><![CDATA[<p>hello! i am new to this whole forum thing, but i was wondering if i might humbly ask for some assistance? i am trying to configure a sketch that uses data plotting and my array is acting up. any/all help would be greatly appreciated. thank you so much.</p>

<pre lang="java">

//Information from: <a href="http://www.oceaneconomics.org/LMR/topTenResults.aspx?selRegions=GL&amp;selYears=2013&amp;selOut=display&amp;noepID=unknown" target="_blank" rel="nofollow">http://www.oceaneconomics.org/LMR/topTenResults.aspx?selRegions=GL&amp;selYears=2013&amp;selOut=display&amp;noepID=unknown</a>


XML FishValue;//The xml file is declared
//ArrayLists for data sets
ArrayList Fish fishes = new ArrayList Fish();
int numOfFish = 10; //number of fish
int [] position = new int [numOfFish]; // array for position of each fish's data
int [] fishValue = new int [numOfFish]; // array for fish values
String [] fishNames = new String [numOfFish];// array for fish names
PFont f;
PImage BG;

void setup() {
  size(640,480);
  colorMode(HSB,360,100,100,100);
 textAlign(CENTER);
  background(0);
  BG = loadImage("GreatLakes.jpg");
  
  //loads the xml file
 FishValue = loadXML("FishValue.xml");
 XML [] Fish = FishValue.getChildren("Fish"); //information is recognized with this function
  
  
 for (int i = 4; i &lt; numOfFish; i++){
   //the ValuePerFish given US dollar value of each fish
   //int ValuePerFish = 
   //the names of each fish
   fishNames[i] = Fish[i].getContent();
   //the spacing between fish data
   position [i] = (width/numOfFish)/2;
   position [i] += (i * (width/numOfFish)/1.5);
  }

 //elements
 for (int m = 0; m  position[0]-50 &amp;&amp; xMouse &lt; position[0]+50) {
      b.movement();
    b.display(70);
    //}
 
 //Points
  for (int i = 1; i &lt; numOfFish; i++) {
    //This causes the points to connect
    int m = i - 1;
    //The x and y positions
    float xPos1 = position[i]-(width/10)/1.2;
   float xPos2 = position[i];
   float yPos1 = height/1.1-FishValue[m]*4;
    float yPos2 = height/1.1-FishValue[i]*4;
    //The lines of the line graph
   //strokeWeight(2);
   //stroke(360,20);
    //line(xPos1, yPos1, xPos2, yPos2);
   //stroke(360,10);
    //line(xPos1, height/1.1, xPos2, height/1.1);
  }
  //The names for each fish
  for (int i = 0; i &lt; numOfFish; i++) {
    fill(170, 30, 90);
    text(fishNames[i], position[i], height/1.05);
 }
  //Value of each fish in US Dollars
  textSize(10);
  fill(360); //text color
  text("Value of each fish in U.S. Dollars", 100, 50);
}
 }
</pre>
]]></description>
   </item>
   </channel>
</rss>