# How to plot multiple graphs in one plot?

**URL:** <https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392>\
**Category:** Libraries\
**Created:** [November 11, 2019, 2:40am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392 "2019-11-11T02:40:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [November 11, 2019, 2:40am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/1 "2019-11-11T02:40:45Z")

</div>

I need to plot multiple graphs in a single plot in real-time. How can I do it ???

---

<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:** [November 11, 2019, 3:48am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/2 "2019-11-11T03:48:15Z")

</div>

you mean like [this ?](http://kll.engineering-news.org/kllfusion01/articles.php?article_id=92#example3)

---

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [November 11, 2019, 6:15am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/3 "2019-11-11T06:15:48Z")

</div>

I have used the Grafica library. I was able to plot signals separately in each plot. But I need multiple lines in one plot in real-time.

 ![multiplot](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/c/ce4ebd7e24f92f46f810732cc32d5ecbb48804a2.jpeg)

---

<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:** [November 11, 2019, 6:24am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/4 "2019-11-11T06:24:11Z")

</div>

i not understand,  
what you show has 3 different curves already

* * *

if a library not does what you want,  
you better learn to do it better / without a library,  
that is why i link you to a example with 2 manual plots in one graph.  
with 5 line code function.

---

<div class="post-metadata">

**Author:** ![KGS](https://avatars.discourse-cdn.com/v4/letter/k/90ced4/32.png) [@KGS](https://discourse.processing.org/u/KGS)\
**Post date:** [November 11, 2019, 6:25am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/5 "2019-11-11T06:25:18Z")

</div>

I need this kind of a plot like in the figure. How can I get it done from processing ???

---

<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:** [November 11, 2019, 6:32am UTC](https://discourse.processing.org/t/how-to-plot-multiple-graphs-in-one-plot/15392/6 "2019-11-11T06:32:40Z")

</div>

[https://jagracar.com/sketches/oktoberfest.php](https://jagracar.com/sketches/oktoberfest.php)  
would be a example from grafica lib for 2 series of data in one plot,  
by using 2 arrays.

if you decide to use one lib you might check out all examples what come with it.

* * *

if you can define line colors and symbols like that i not know.  
you tell us after you found out.
