Skip to content

Error when using FFT on data with one point #3018 #6

@Silas-K

Description

@Silas-K

See issue: pyqtgraph#3018

"""
Simple example to reproduce the fft error
"""

import numpy as np
import pyqtgraph as pg

win = pg.plot()
win.setWindowTitle('pyqtgraph example: FFT')

# Add a plot
x = np.array([1])
y = np.array([1])
win.plot(x, y, pen=None, symbol='o')  # Plot a single data point

# After plotting apply the fft transform in the context menu
# --> Plot Options
#     --> Transforms
#         --> Power Spectrum (FFT)

if __name__ == '__main__':
    pg.exec()

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions