Python Forum
how can I create graphics using matplotlib
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how can I create graphics using matplotlib
#6
I could run your code in Scilab. Here is a first python equivalent
import numpy as np
from matplotlib import pyplot as plt
N = 40
x = np.ones(N+1)
b = 0.7
S = 5
a =(1 - b) / (1-b**S)
i = np.arange(1,S+1)
 
w = a * (b**(S-i))
# print(w)
y = np.zeros(N)
y[S-1:] = [ np.dot(w, x[n-S+1:n+1].T) for n in range(S-1, N)]
print(y)
print(len(y))
plt.plot(range(S, N+1),y[S-1:], marker='o')
plt.plot(range(S, N+1),y[S-1:], linestyle='-')
plt.show()
Reply


Messages In This Thread
RE: how can I create graphics using matplotlib - by Gribouillis - Nov-20-2018, 07:07 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question I’m trying to create a Power BI Matplotlib quadrant chart and I’m a little stumped. Nidwolff 1 576 Mar-04-2024, 06:07 AM
Last Post: Danishhafeez
  treatment of graphics KirillCh 0 1,496 Sep-16-2020, 10:05 AM
Last Post: KirillCh
  matplotlib.pyplot functions create new figures instead of applying to the current one karkas 2 2,198 Jul-09-2020, 08:32 AM
Last Post: karkas
  How to create matplotlib subplots from figures vitaly 3 3,252 Mar-02-2020, 12:58 AM
Last Post: scidam
  how can I create a recursive graphic with matplotlib royer14 3 3,899 Nov-22-2018, 05:00 PM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020