<div dir="ltr"><div dir="ltr">Hey Jerzy,<div><br></div><div>The "figure" parameter to host_subplot is documented here: <a href="https://matplotlib.org/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot.html#mpl_toolkits.axes_grid1.parasite_axes.host_subplot">https://matplotlib.org/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot.html#mpl_toolkits.axes_grid1.parasite_axes.host_subplot</a></div><div><br></div><div>Based on that page, I think it's safe to say that the OP did read the docs. It's just not at all clear that additional Axes creation args need to be passed.</div><div>-Paul </div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 10, 2020 at 1:52 PM Jerzy Karczmarczuk <<a href="mailto:jerzy.karczmarczuk@unicaen.fr">jerzy.karczmarczuk@unicaen.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Le 10/06/2020 à 20:15, Neal Becker a écrit :<br>
</p>
<blockquote type="cite">I
tried to use host_subplot with a figure argument. <font color="#ff0000"><b>Why does this fail?</b></font>
<div>------------------------<br clear="all">
<div>import matplotlib.pyplot as plt<br>
fig,ax = plt.subplots()<br>
host = host_subplot(figure=fig) ##<i> of course, import is
missing... (JK)</i><br>
</div>
<div>------------------------</div>
</div>
<div>ValueError: Illegal argument(s) to subplot: ()</div>
</blockquote>
<p><b><i>Please, why don't you read the docs?...<br>
</i></b><i>Where have you found </i><i>the fig parameter?</i><b><i><br>
</i></b></p>
<ol>
<li>You never mention the parasite axes etc., so perhaps simple <font face="Courier New, Courier, monospace"><b>add_subplot</b></font>
might be convenient.<br>
</li>
<li>Anyway, both, <font face="Courier New, Courier, monospace"><b>subplot</b></font>,
and <br>
<b><font face="Courier New, Courier, monospace">from
mpl_toolkits.axes_grid1 import </font></b><b><font color="#ff0000"><font face="Courier New, Courier, monospace">host_subplot</font><br>
</font></b>share the geometry parameters, say 221 (columns,
rows, which).</li>
<li>Look e.g., here:<br>
<br>
<font face="Courier New, Courier, monospace"><b><a href="https://matplotlib.org/gallery/axisartist/demo_parasite_axes2.html?highlight=host_subplot" target="_blank">https://matplotlib.org/gallery/axisartist/demo_parasite_axes2.html?highlight=host_subplot</a><br>
</b></font> or here:<font face="Courier New, Courier,
monospace"><b><br>
<a href="https://stackoverflow.com/questions/33396190/what-are-the-parameters-of-host-subplot-in-matplotlibs-mpl-toolkits-axes-grid1" target="_blank">https://stackoverflow.com/questions/33396190/what-are-the-parameters-of-host-subplot-in-matplotlibs-mpl-toolkits-axes-grid1</a>
<br>
</b></font></li>
</ol>
<p>And most probably a dozen more.</p>
<p>Jerzy Karczmarczuk<br>
/Caen, France/</p>
<p><br>
</p>
<br>
<br>
</div>
_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
</blockquote></div>