<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Le 10/06/2020 à 20:15, Neal Becker a écrit :<br>
</p>
<blockquote type="cite"
cite="mid:CAG3t+pFT7jC4zBOv3VW0eYE+3x+CK8xwCQ0kP7jsYZmRBy-uzw@mail.gmail.com">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 class="moz-txt-link-freetext" href="https://matplotlib.org/gallery/axisartist/demo_parasite_axes2.html?highlight=host_subplot">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 class="moz-txt-link-freetext" href="https://stackoverflow.com/questions/33396190/what-are-the-parameters-of-host-subplot-in-matplotlibs-mpl-toolkits-axes-grid1">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>
</body>
</html>