problems with matplotlib

22 views
Skip to first unread message

Rizky Maulana Nurhidayat

unread,
Sep 24, 2019, 12:25:46 PM9/24/19
to astroML-general
Hi, I'm a beginner in python and astroML

I have a problem, when I tried to run some examples in kernel density, I got this
"rc() takes 1 positional argument but 2 were given"

How can I fix this?

Thanks

Brigitta Sipocz

unread,
Sep 24, 2019, 12:47:29 PM9/24/19
to Rizky Maulana Nurhidayat, astroML-general
Hi  Rizky,

Could you please copy paste the full example you try to run, including the traceback? What versions of astroML and matplotlib are you using?

Cheers,
 Brigitta

--
You received this message because you are subscribed to the Google Groups "astroML-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astroml-gener...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astroml-general/fa33e9a0-8fc8-4309-80a4-f3b22d859dca%40googlegroups.com.

Rizky Maulana Nurhidayat

unread,
Sep 24, 2019, 1:00:27 PM9/24/19
to astroML-general
Hi Brigitta,

with traceback

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-42-041ffe8f6fc3> in <module>
     14 if "setup_text_plots" not in globals():
     15     from astroML.plotting import setup_text_plots
---> 16 setup_text_plots(fontsize=8, usetex=True)
     17 
     18 #------------------------------------------------------------

~/.local/lib/python3.7/site-packages/astroML/plotting/settings.py in setup_text_plots(fontsize, usetex)
     20     else:
     21         # New in mpl 3.1
---> 22         matplotlib.rc('scatter.edgecolors', 'b')
     23     matplotlib.rc('grid', linestyle=':')
     24     matplotlib.rc('errorbar', capsize=3)

TypeError: rc() takes 1 positional argument but 2 were given

I am using matplotlib with version 3.1.0 and astroML version 0.4.post1

Best regards,
Rizky

On Tuesday, September 24, 2019 at 11:47:29 PM UTC+7, Brigitta Sipocz wrote:
Hi  Rizky,

Could you please copy paste the full example you try to run, including the traceback? What versions of astroML and matplotlib are you using?

Cheers,
 Brigitta

On Tue, 24 Sep 2019 at 09:25, Rizky Maulana Nurhidayat <rizman...@gmail.com> wrote:
Hi, I'm a beginner in python and astroML

I have a problem, when I tried to run some examples in kernel density, I got this
"rc() takes 1 positional argument but 2 were given"

How can I fix this?

Thanks

--
You received this message because you are subscribed to the Google Groups "astroML-general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to astroml...@googlegroups.com.

Brigitta Sipocz

unread,
Sep 24, 2019, 1:12:36 PM9/24/19
to Rizky Maulana Nurhidayat, astroML-general
Oh, yes indeed. This is a bug when using matplotlib >=v3.1. It has been fixed in the developer version, but hasn't yet been released (https://github.com/astroML/astroML/pull/188).

I planned to make a bugfix release in the next two weeks.

In the meantime you can either wait for the v0.4.1 release, or downgrade matplotlib to be <v3.1, or remove that one line when you run the example (the figure will be uglier, but everything else should keep working).

Cheers,
 Brigitta



To unsubscribe from this group and stop receiving emails from it, send an email to astroml-gener...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/astroml-general/b28b5852-458c-48f8-a59b-495fc37eed72%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages