0

I am searching for a way to plot the Global Alignment in Python, such that it looks like in the appended image.Global ALignment

Despite going through many documentaries of matplotlib and seaborn, I wasn't able to find a satisfying solution. I tried to adjust the grid lines of my plot to change them into arrows or thought of a way to implement the plt.arrow of matplotlib. However I can't think of a way to calculate the grid coordinates.

The next thing would be to color every section, such that their score is shown as heatmap. But I am not quite sure if implementing both features would be possible?

  • the question needs sufficient code for a minimal reproducible example: https://stackoverflow.com/help/minimal-reproducible-example – D.L Mar 29 '23 at 21:03
  • I'd use annotate https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.annotate.html to make the arrows (with no text) and scatter to add the circles. – Jody Klymak Mar 30 '23 at 05:11
  • You might want to take a look at [plot a grid with arrows on it](https://stackoverflow.com/questions/72751096/plot-a-grid-with-arrows-on-it) for inspiration. – JohanC Mar 30 '23 at 07:04
  • Thanks @JodyKlymak ! I used subplots() to make the alignment matrix and scattered the arrows and circles on it. It also worked fine for heatmapping with im = ax.imshow() :). – Kactaceapengu Apr 04 '23 at 20:11

0 Answers0