vin*_*e93 6 erlang graph elixir
我想在 elixir 中绘制条形图并将其另存为图像。
有没有什么好的图表库可以做到这一点?
我尝试在elixir.libhunt.com和github.com/h4cc/awesome-elixir上搜索,但没有找到我需要的单个包。
提前致谢。
是的 - 您可以使用gnuplot-elixir连接到gnuplot
import Gnuplot
chart = [
[:set, :term, :png, :size, '512,512'],
[:set, :output, Path.join("/tmp", "barchart.PNG")],
[:set, :boxwidth, 0.5],
~w(set style fill solid)a,
[:plot, "-", :using, '1:3:xtic(2)', :with, :boxes]
]
dataset = [[0, "label", 100], [1, "label2", 450], [2, "bar label", 75]]
plot(chart, [dataset])
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1286 次 |
| 最近记录: |