I have a .txt file contatning points which is look like following:
##x1 y1 x2 y2
123 567 798 900
788 900 87 89
....
I want to draw 2D diagram
You can also do this using rsvg-convert
(from librsvg) or svg2png
. Both of those programs expect an inout file in SVG format and render it as a PNG file. So you would need to convert your
123 567 798 900
788 900 87 89
into this type of thing
That can be done easily enough with a little awk
script like this:
awk '
BEGIN{ printf("\n") }' points.txt
You can then pump the output of that into either of the two programs I mentioned above:
awk ... | rsvg-convert -b \#ffff00 > result.png