如何为pythonezh创建多轴

2024-04-19 04:01:08 发布

您现在位置:Python中文网/ 问答频道 /正文

我想使用python ezhc(Higstock chart)显示多个Y轴。我添加了一个以上的Y轴如下,但由于某些原因,这两个轴都显示在图表的右侧。请告诉我这里有什么问题

g.xAxis=[{
        "categories": ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
            'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
        "crosshair": "true"
    }]

g.yAxis=[
    {

        "title": {
            "text": 'hello',

        },
         "opposite": "false"


    },

 {

        "title": {
            "text": 'Temperature',

        },
        "opposite": "true"

 }

]

g.series=[
{
    "data":df["volt"],
    "yAxis": 1,
    "type":"column"

},
 {
    "data":df["temp"],
    "yAxis": 2,
     "type":"line"
}

]


Tags: texttruedfdatatitletypechart图表