-1

I have been trying to plot a certain signal on python but it keeps giving me an error message I don't know how to solve it

from matplotlib import pyplot as plt
from matplotlib import style
import mysignals as Sig

style.use('ggplot')
style.use('dark_background')
f,pltr_arr=plt.subplots(3,sharex=True)

pltr_arr[0].plot(sig.lnputSignal_1KHz_15kHz,color='magenta')
pltr_arr[0].set_title('subplot 1',color='magenta')

pltr_arr[1].plot(sig.InputSignal_1kHz_15kHz,color='yellow')
pltr_arr[1].set_title('Subplot 1', color='yellow')

pltr_arr[2].plot(sig.InputSignal_1kHz_15lkHz,color='green')
pltr_arr[2].set_title('Subplot 1',color='green')

above is the code of what I tried and below is the error message


ModuleNotFoundError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_9776\3731026071.py in 1 from matplotlib import pyplot as plt 2 from matplotlib import style ----> 3 import mysignals as Sig 4 5 style.use('ggplot')

ModuleNotFoundError: No module named 'mysignals'

2
  • 1
    What is mysignals? Commented Jan 30, 2023 at 18:34
  • the name of the dataset Commented Jan 30, 2023 at 18:37

2 Answers 2

1

You imported as "Sig" (import mysignals as Sig)

but you're trying to plot as sig. (small "s")

Sign up to request clarification or add additional context in comments.

Comments

0

Your error is ModuleNotFoundError: No module named 'mysignals'.

This error occurred since there is no python module named mysignals.py in the same directory or in installed through pip (see pip list).

See this for detailed instructions on how to import local files

1 Comment

A link to an answer is not an answer. If a question is answered already on Stack Overflow, it should be closed as a duplicate

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.