# How to use "plotyy" for showing several sets of graphs in one plot

**URL:** https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204
**Category:** Visualization
**Tags:** plotting
**Created:** [April 16, 2019, 1:00pm UTC](https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204 "2019-04-16T13:00:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![mirtah](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mirtah](https://discourse.julialang.org/u/mirtah)
#### Post date: [April 16, 2019, 1:00pm UTC](https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204/1 "2019-04-16T13:00:32Z")

</div>

Dear all.  
I would like to know how to use “plotyy” for showing several sets of graphs in one plot.  
Thank you very much  
Best regards  
using PyPlot,SetPyPlot  
plotyy(A1, B1, C1, D1)  
plotyy(A2, B2, C2, D2)  
plotyy(A3, B3, C3, D3)

---

<div class="post-metadata">

### Author: ![Paul\_Soderlind](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/paul_soderlind/32/1753_2.png) [@Paul\_Soderlind](https://discourse.julialang.org/u/Paul_Soderlind)
#### Post date: [April 16, 2019, 1:11pm UTC](https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204/2 "2019-04-16T13:11:48Z")

</div>

Perhaps  
[https://gist.github.com/gizmaa/7214002](https://gist.github.com/gizmaa/7214002)  
helps (scroll down to " Multi-axis Plot").

Notice, however, that the `ax[:set_position](new_position)` should now be written `ax.set_position(new_position)`

---

<div class="post-metadata">

### Author: ![mirtah](https://avatars.discourse-cdn.com/v4/letter/m/ed655f/32.png) [@mirtah](https://discourse.julialang.org/u/mirtah)
#### Post date: [April 16, 2019, 2:43pm UTC](https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204/3 "2019-04-16T14:43:23Z")

</div>

Thank you very much for replying.  
I copied the code from the link but it does not work for me.  
I am using julia version 0.6.3

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [April 16, 2019, 2:58pm UTC](https://discourse.julialang.org/t/how-to-use-plotyy-for-showing-several-sets-of-graphs-in-one-plot/23204/4 "2019-04-16T14:58:02Z")

</div>

> [@mirtah](#):
>
> I am using julia version 0.6.3

That could be the reason. I would recommend upgrading to 1.1.

Also, “does not work” is not sufficient to help you. Please provide an MWE and the error message.

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …
