Open saumil-sh opened 3 years ago
Thank you so much @SamD97 for your request! I agree with you that streamplot
may be reasonable to be implemented. Maybe the reason I did not inherit it from Matplotlib was simply that I am not familiar with the algorithm of streamplot
and how it would be in ternary plots. I would like to take a look more seriously to find how to do / what to do. If you're already familiar with the algorithm of streamplot
and how it would be in ternary plots, may I also later ask you your thoughts?
Hello @yuzie007, thank you for your reply. I am glad to know that you agree on the addition of streamplot
. I'd be happy to discuss whatever I know. So far, I have had limited success with my try using Affine2D().skew()
(attached image, also the result I am aiming for using mpltern
). I tried being smart and importing the LineCollection
to a different subplot with projection='ternary'
, but matplotlib
denied my efforts saying ValueError: Can not reset the axes. You are probably trying to re-use an artist in more than one Axes which is not supported
😅 .
Thank you @SamD97 for your reply, and sorry for my long silence. The figure looks very cool. We can indeed implement this streamplot style.
It seems presently Matplotlib streamplot
is specifically for rectangular grid (although we can probably transform this into the triangular view as you did), while I hope to have the interpolation on the triangular lattice, due to the philosophical reason that in ternary plots all three coordinates should be dealt on an equal footing. Let me kindly give a little time to survey if this is indeed possible. Once I get updates, I would like to let you know again!
I also find this package does not support streamplot, who can help me? and also I try to use ggtern package in R, and plotly package in python, they all do not support streamplot.
Hi, Thank you for writing this package I find it very easy-to-use and handy. I sometimes prefer
streamplot
overquiver
. I was wondering if you could also add this feature. I'd understand if you don't have the time for it. In that case, could you give me some instructions on how to add this feature, I am willing to do it and make a merge request. I suppose it shouldn't be too difficult sincequiver
andstreamplot
are not very different.Thank you again!
Edit: I (naively) tried copying the
quiver
block and changing it tostreamplot
at line 757 here https://github.com/yuzie007/mpltern/blob/977d26d624a87d9c74a81aa7e84198bf70ea34a9/mpltern/ternary/_axes.py, which lead to the following errorValueError: 'x' must be strictly increasing
.