Home > Mobile >  How to make a vertical stem plot?
How to make a vertical stem plot?

Time:07-23

I have the next stem plot

plt.stem(m)

stem plot 1

and I want it but 90 degrees clockwise rotated. I've tried with

plt.stem(m,np.arange(m.size))

And obtain the next plot

stem plot 2

The expecting result it's something like the R(t) of the next image: enter image description here

and:

import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(0.1, 2 * np.pi, 41)
y = np.exp(np.sin(x))

plt.stem(x,y, orientation='vertical')
plt.show()

enter image description here

  • Related