I want to create a figure with 2 subplots using mosaic and display the same signal in polar and cartesian coordinates with Matplotlib.
import matplotlib.pyplot as plt
import numpy as np
t = np.arange(0, 30, 0.1)
s = np.sin(2 * np.pi * 1 * t)
fig = plt.figure(layout="constrained")
ax_dict = fig.subplot_mosaic(
[
["signal1"],
["signal2"],
]
)
p1 = ax_dict["signal1"].plot(s)
p2 = ax_dict["signal2"].plot(s)
plt.show()
So I would like to display on the left the figure in cartesian coordinate and on the right in polar. How is it possible ?
Thank you in advance.