绘图引擎

Plotting engine

本文关键字:引擎 绘图      更新时间:2023-10-16

在C/c++领域我不知道一个轻量级的和好看的库用于创建图形。我有兴趣创建一个具有"gnuplot"功能的c++库作为一个长期项目-首先是绘制线条:)。

因此,我对论文、关键词、结构等感兴趣。

在第一步,它将足够创建一个图像格式,如Jpeg或PNG, EPS,而不使用窗口绘制。

希望我能得到信息的地方看:)

问候

试试这个库。它是Ch/c++: https://www.softintegration.com/docs/ch/plot/

绘图就像

一样简单
  #include <math.h>
    #include <chplot.h>
    int main() {
        int numpoints = 36;
        array double x[numpoints], y[numpoints];
        class CPlot plot;
        lindata(0, 360, x, 36);
        y = sin(x*M_PI/180);
        plotxy(x, y, "Ch plot", "xlabel", "ylabel", &plot);
        /* create a postscript file */
        plot.outputType(PLOT_OUTPUTTYPE_FILE, "postscript eps", "demo.eps");
        plot.plotting();
        /* create a png file */
        plot.outputType(PLOT_OUTPUTTYPE_FILE, "png color", "demo.png");
        plot.plotting();
    }