Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scatter Plots in C++ [closed]

Tags:

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?

like image 680
paxos1977 Avatar asked Oct 18 '08 14:10

paxos1977


People also ask

What is C argument in scatter plot?

c : color, sequence, or sequence of color, optional, default: 'b' The marker color. Possible values: A single color format string. A sequence of color specifications of length n.

What is a no correlation scatter plot?

If the points on the scatter plot seem to be scattered randomly, there is no relationship or no correlation between the variables. When there is a positive or negative relationship between your variables, you can draw a line of best fit.

How do you read a scatter plot?

The closer the data points come to forming a straight line when plotted, the higher the correlation between the two variables, or the stronger the relationship. If the data points make a straight line going from near the origin out to high y-values, the variables are said to have a positive correlation.


1 Answers

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 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  

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

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.

like image 143
freespace Avatar answered Oct 22 '22 11:10

freespace