[Matplotlib-users] host_subplot figure argument

Paul Hobson pmhobson at gmail.com
Wed Jun 10 19:03:20 EDT 2020


Hey Jerzy,

The "figure" parameter to host_subplot is documented here:
https://matplotlib.org/api/_as_gen/mpl_toolkits.axes_grid1.parasite_axes.host_subplot.html#mpl_toolkits.axes_grid1.parasite_axes.host_subplot

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.
-Paul

On Wed, Jun 10, 2020 at 1:52 PM Jerzy Karczmarczuk <
jerzy.karczmarczuk at unicaen.fr> wrote:

> Le 10/06/2020 à 20:15, Neal Becker a écrit :
>
> I tried to use host_subplot with a figure argument.  *Why does this fail?*
> ------------------------
> import matplotlib.pyplot as plt
> fig,ax = plt.subplots()
> host = host_subplot(figure=fig)  ##* of course, import is missing... (JK)*
> ------------------------
> ValueError: Illegal argument(s) to subplot: ()
>
>
> *Please, why don't you read the docs?... **Where have you found **the fig
> parameter?*
>
>    1. You never mention the parasite axes etc., so perhaps simple
>    *add_subplot* might be convenient.
>    2. Anyway, both, *subplot*, and
>    *from mpl_toolkits.axes_grid1 import *
> *host_subplot *share the geometry parameters, say 221 (columns, rows,
>    which).
>    3. Look e.g., here:
>
>
> *https://matplotlib.org/gallery/axisartist/demo_parasite_axes2.html?highlight=host_subplot
>    <https://matplotlib.org/gallery/axisartist/demo_parasite_axes2.html?highlight=host_subplot>
>    *   or here:
>
> *
>    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>
>    *
>
> And most probably a dozen more.
>
> Jerzy Karczmarczuk
> /Caen, France/
>
>
>
>
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users at python.org
> https://mail.python.org/mailman/listinfo/matplotlib-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20200610/d44493c5/attachment.html>


More information about the Matplotlib-users mailing list