1

I am going through seaborn.jointplot() documentation (link) and it says that this function has these parameters:

seaborn.jointplot(*, x=None, y=None, data=None, kind='scatter', color=None, height=6, ratio=5, space=0.2, dropna=False, xlim=None, ylim=None, marginal_ticks=False, joint_kws=None, marginal_kws=None, hue=None, palette=None, hue_order=None, hue_norm=None, **kwargs)

We can clearly see that there are no marker or s parameters. However, later in the same page there is an example: sns.jointplot(data=penguins, x="bill_length_mm", y="bill_depth_mm", marker="+", s=100, marginal_kws=dict(bins=25, fill=False)) that outputs this figure without any errors.

My question is why can values for parameters marker or s be provided and no error is raised, even if these parameters are not listed in the official documentation as seen above? Also, where can I find other parameters (besides marker or s), that are not listed in the official documentation, but are accepted by seaborn.jointplot()?

Thank you.

  • 1
    The `**kwargs` means that the function can take an arbitrary number of keyword arguments. Check [*args and **kwargs](https://stackoverflow.com/questions/36901/what-does-double-star-asterisk-and-star-asterisk-do-for-parameters) – warped Jan 02 '21 at 21:43
  • Yes, thank you. But where can I find all possible options for keyword arguments for this function? – Martynas Venckus Jan 02 '21 at 21:51
  • look into the source code, and check which function that **kwargs are passed to. Then look at the arguments that function takes. – warped Jan 02 '21 at 21:53
  • Found the [part](https://github.com/mwaskom/seaborn/blob/master/seaborn/axisgrid.py#L2049) where `jointplot()` function is defined. Still not sure if I really understand where `marker` come from as a `**kwarg`. Still, thanks for the help, @warped. :) – Martynas Venckus Jan 02 '21 at 22:18

0 Answers0