Skip to content

Docs for matplotlib.pyplot.specgram() reference an unsupported mode setting #13540

Closed
@bcongdon

Description

@bcongdon

Bug report

Bug summary

The docs for matplotlib.pyplot.specgram's mode argument reference the 'complex' mode setting, which is not a valid option:

'complex' returns the complex-valued frequency spectrum. (from here)

However, if you try to set mode='complex', you receive a ValueError due to this line of code:

if mode == 'complex':
raise ValueError('Cannot plot a complex specgram')

Code for reproduction

import matplotlib.pyplot as plt
import numpy as np
plt.specgram(np.ones(1000), Fs=100, mode='complex')

Expected outcome

The docs should not reference the complex mode type if it is not planned supported.

Matplotlib version
N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions