# Plot a graph through processing

**URL:** <https://discourse.processing.org/t/plot-a-graph-through-processing/11604>\
**Category:** Coding Questions\
**Created:** [May 26, 2019, 10:45am UTC](https://discourse.processing.org/t/plot-a-graph-through-processing/11604 "2019-05-26T10:45:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![thatone](https://avatars.discourse-cdn.com/v4/letter/t/97f17d/32.png) [@thatone](https://discourse.processing.org/u/thatone)\
**Post date:** [May 26, 2019, 10:45am UTC](https://discourse.processing.org/t/plot-a-graph-through-processing/11604/1 "2019-05-26T10:45:26Z")

</div>

Hello,

I’ve having a bit of a problem with this exercise. I’m supposed to plot a the graph 300=(x\*x)/200;  
To get there x is supposed to be added 0.1 at each time and the graph should stop at y=300.  
Through my current code I can code up the whole graph as indivial points but it’s supposed to show the whole graph from 0\<x\<245 as red circles. The background should be black.

Anyone that has any ideas what i might be doing wrong, would really be appreciated and thanks in advance. The code is:

```auto
float x =0;
float y =0;
void setup(){  
size(400,400);
background(0);

}

void draw(){

  x=x+0.1;
  y=(x*x)/200;
fill(255,0,0);
   ellipse(x,400-y,5,5);

  
}

```

---

<div class="post-metadata">

**Author:** ![TheWizardBear](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/thewizardbear/32/3552_2.png) [@TheWizardBear](https://discourse.processing.org/u/TheWizardBear)\
**Post date:** [May 26, 2019, 12:35pm UTC](https://discourse.processing.org/t/plot-a-graph-through-processing/11604/2 "2019-05-26T12:35:53Z")

</div>

The problem is that, by default, the ellipses have a black outline and as you are plotting all your points really close together, these outlines are overlapping the previous points so they appear black and blend in with the background.  
Put `noStroke()` in draw to get rid of the outlines.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [May 26, 2019, 12:41pm UTC](https://discourse.processing.org/t/plot-a-graph-through-processing/11604/3 "2019-05-26T12:41:54Z")

</div>

exactly,

```auto
float step = 0.1;

void setup() {  
  size(400, 400);
  fill(255,0,0);
  stroke(255,0,0);
}

void draw() {
  background(0);
  for ( float x = 0; x < 245; x += step ) ellipse(x, 400-(x*x)/200, 5, 5);
}

```
