Size of svg file

13 views
Skip to first unread message

Hanna Liashenko

unread,
Nov 7, 2023, 3:36:44 AM11/7/23
to dislin-users
Hello, Helmut. I have one problem with creating svg file. The graph in svg format is very large (about 4 GB). I use rlpoin for create point in graph and there is a big number of points. And I think it is the problem with size (big data array). Use curve(for example) i can't, because each point should have different color and form(depending on the value). How it is possible to solve it? 

Helmut Michels

unread,
Nov 8, 2023, 10:33:06 AM11/8/23
to dislin-users
Dear Hanna,

each call to rlpoin writes a rect fill tag to the SVG file with nearly 80 bytes for each call. I think that
you have about 50 millions of rlpoin calls in your program for creating a 4 GB SVG file.There is
no routine in Dislin that you can use instead of rlpoin for reducing the size of the SVG file. Perhaps,
you can create an image format such as PNG, where the size of the PNG file is independently from the
number of rlpoin calls, or from any other plot vectors. It's also easy to include a PNG file into a SVG file
with the image tag.

With best regards,

Helmut

Hanna Liashenko

unread,
Nov 9, 2023, 3:04:38 AM11/9/23
to dislin-users
Thanks for your help, Helmut!
My tool should create png, svg and jpg format, use for it only DISLIN or standard C++ library. It's a small challenge. But idea with including a png into svg - very helpful. I'll try it.

среда, 8 ноября 2023 г. в 16:33:06 UTC+1, mic...@dislin.de:
Reply all
Reply to author
Forward
0 new messages