PyCharm - Auto Completion for matplotlib (and other imported modules)

前端 未结 2 693
滥情空心
滥情空心 2021-02-07 20:50

I am using PyCharm 2016.1 and Python 2.7 on Windows 10 and imported the matplotlib module.

As the matplotlib module ist very extensive and I am relatively new to Python

2条回答
  •  孤独总比滥情好
    2021-02-07 21:21

    In addition to Paul's answer. If you are using fig, ax = plt.subplots() , you could use figure type hint. See below example:

    from matplotlib import pyplot as plt
    import matplotlib.axes._axes as axes
    import matplotlib.figure as figure
    
    fig, ax = plt.subplots()  # type:figure.Figure, axes.Axes
    ax.
    fig.

提交回复
热议问题