by dmoura on 3/22/22, 7:30 PM with 0 comments
Some examples:
$ plt "hist(x,30)" < sample.json
$ cat sample.json | plt --no-show "hist(x,30); savefig('myimage.png')"
$ plt --no-input "
x = np.linspace(-1,1,2000);
y = x*np.sin(1/x);
plot(x,y);
axis('scaled');
grid(True)"
$ echo '
{"a":0, "b":1}
{"a":1, "b":0}
{"a":3, "b":3}' |
plt "plot(a,b)"