theislab/scvelo

Need help with the parsing of stream plot result

NikTuzov opened this issue · 1 comments

Hello:

I'm working with scvelo and my goal is to extract the lines and arrows information displayed by velocity_embedding_stream(). I want to get those coordinates to reuse them elsewhere.

velocity_embedding_stream() is essentially a wrapper for matplotlib.streamplot(). I attached a Jupyter notebook with some data that are fed to matplotlib.streamplot(). The latter generates the lines and arrows as LineCollection and PatchCollection objects, but they end up being on different scales. I tried some hacking to make them agree, all to no avail.

I am sorry for asking a question that is more about matplotlib than scvelo, but matplotlib experts are scarce.

lines_and_arrows.zip

You can check the code to generate the figure here and extract the code generating the needed info.