How to create ternary contour plot in Python?

后端 未结 4 2072
余生分开走
余生分开走 2020-12-13 02:53

I have a data set as follows (in Python):

import numpy as np
A = np.array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0, 0.1, 0.2, 0.3, 0.4, 0.2, 0.2, 0.05         


        
4条回答
  •  忘掉有多难
    2020-12-13 03:24

    Yes they can; there are at least a couple of packages to help.

    I once tried to gather them all in a blog post, Ternary diagrams. Be sure to look at the various links and comments too.

    Update on 2019-09-11: I wrote a more recent, and more hands-on blog post on the same subject: x lines of Python: Ternary diagrams. It uses the python-ternary library referenced before.

    These seem to be the best options for Python:

    • Marc Harper's python-ternary
    • Veusz, a Python plotting library

    There are also some suggestions in another SO question: Library/tool for drawing ternary/triangle plots [closed].

提交回复
热议问题