本文介绍了C ++中的散布图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++中绘制散点图的最好方法是什么?

What is the best way to graph scatter plots in C++?

您是否将数据写入文件并使用其他工具?

Do you write data to a file and use another tool? Is there a library like matplotlib in Python?

推荐答案

我总是写出数据,然后使用来创建我的图表。这是迄今为止我发现生产各种格式的图形的最好的方式:eps,png,jpeg,xpm,你命名。

I always write out data and then using gnuplot to create my graphs. It is by far the best way I have found of producing graphs in a variety of formats: eps, png, jpeg, xpm, you name it.

gnuplot 将很容易做散点图。如果 x y 值在2个空格分隔的列中,则

gnuplot will do scatter plot very easily. Provided the x and y values are in 2 space-separated columnss, then

plot "data.txt" using 1:2


$ b b

将给你一个快速散点图。然后你可以调整它,什么不使用其他gnuplot命令。

Will give you a quick scatter plot. Then you can adjust it and what not using other gnuplot commands.

如果您参与科学,那么学习 gnuplot 将对您非常有价值。它肯定会踢出来的杰作,它使得绘图包括在论文中的任务。

If you are involved in sciences, then learning gnuplot will be very valuable to you. It kicks the crap out of doing excel plots for sure and it eases the task of making plots to include in papers.

这篇关于C ++中的散布图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 20:54