imr-framework / pypulseq

Pulseq in Python
https://pypulseq.readthedocs.io
GNU Affero General Public License v3.0
118 stars 63 forks source link

feature: set sequence plots to share X axis #13

Closed grlee77 closed 5 years ago

grlee77 commented 5 years ago

Is your feature request related to a problem? Please describe.

The plot method of the Sequence class would be more useful if the sharex attribute of the subplots was set. This would make it so that if the user zooms in on one subplot, the others would also be zoomed by the same amount.

Without this feature, it is hard for the user to inspect the relative
timing of events.

Describe the solution you'd like If unfamiliar, a figure with subplots sharing an x axis can be created use notation such as: fig, axes = plt.subplots(3, 1, sharex=True) axes[0].plot(t, gx) axes[1].plot(t, gy) axes[2].plot(t, gz)

Describe alternatives you've considered the figure add_subplot method can also take a sharex argument if you are adding the subplots one by one instead of creating them upfront as in the example above

Additional context