L
L
leremin2018-12-04 18:47:04
Graphic arts
leremin, 2018-12-04 18:47:04

How to draw and save a graph to a file without a strong connection to the GUI?

The task is to draw a simple graph in a console application in c#. You can, of course, draw some kind of Chart, but for the sake of this, pulling Winforms is stupid. I tried to draw Matplotlib in Python, but after cx_freeze the assembly weighs 150 megabytes and has 2500 files ...
Ideally, I see a tiny EXE without a bunch of files, into which I throw the plot data and a name for saving with command line arguments. In what way can this be done?
I have only one idea: to form SVG by hand. But then it's easier to connect WinForms.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
V
vaut, 2018-12-04
@vaut

gnuplot?
It seems to be under Windows.

G
Griboks, 2018-12-04
@Griboks

Create a Bitmap, paint pixels according to the schedule, save the Bitmap.

R
Roman Mirilaczvili, 2018-12-04
@2ord

Or svg manually/library or WinForms/GnuPlot.
It seems most logical to write a gui application on .net

S
Sumor, 2018-12-04
@Sumor

You can pull wpf classes into the console and do it through WritableBitmap by points or DrawinImage by lines. You can save at least in png, at least in jpg.
You can pull Winforms classes into the console and do it through Bitmap point by point.
You can use libraries such as Magick.NET .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question