PyG2Plot icon indicating copy to clipboard operation
PyG2Plot copied to clipboard

现在是否支持将绘制好的图保存为图片格式的呢?而非html

Open gittigxuy opened this issue 4 years ago • 8 comments

gittigxuy avatar Feb 23 '21 08:02 gittigxuy

很好的提议,是否有能力来 pr 这个能力?

hustcc avatar Feb 23 '21 08:02 hustcc

或许可以直接用这个?

from snapshot_selenium import snapshot

Lix1993 avatar Mar 11 '21 06:03 Lix1993

或许可以直接用这个?

from snapshot_selenium import snapshot

应该可以的

hustcc avatar Mar 11 '21 10:03 hustcc

@Lix1993 可以在 readme 中加一个使用的案例应该就可以了。或者 PyGPlot 导出一个截图方法出来。

hustcc avatar Mar 12 '21 02:03 hustcc

echarts专用的, 用下面的js截屏, 要改下

    var ele = document.querySelector('div[_echarts_instance_]');
    var mychart = echarts.getInstanceByDom(ele);
    return mychart.getDataURL({
        type: 'png',
        pixelRatio: 2,
         excludeComponents: ['toolbox']
    });
"""

Lix1993 avatar Mar 12 '21 02:03 Lix1993

同求增加一个render_img方法,输出成图片,图片size可自定义

testerclub avatar Mar 16 '21 05:03 testerclub

有没有想来 contribute 的?如果没有的话,我五一期间试试看。

hustcc avatar Apr 21 '21 05:04 hustcc

2022了,render_img方法有实现吗

sunslj avatar Jan 11 '22 02:01 sunslj