Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Good plotting library for C? [closed]

Tags:

c

plot

gnuplot

My question is very similar in spirit to this question: What is the best plotting library for Python?

What is my best bet for plotting data in C? Am I better off forgoing a library and just generating data that I can feed directly into gnuplot?

My impetus for this question is being able to visualize DSP transformations while studying the excellent resources found in an earlier question of mine. So the focus is really just 2D plots, histograms, etc.; 3D isn't as important right now.

like image 398
Kevin L. Avatar asked Aug 14 '09 00:08

Kevin L.


People also ask

Which library is used for plotting?

Matplotlib Matplotlib is the most popular data visualization library of Python and is a 2D plotting library. It is the most widely-used library for plotting in the Python community and is more than a decade old.

Can you plot graphs in C?

C and Gnuplot can be used to plot complex functions. One can write the function in C and then write the values of the function at various values in a txt file, which can then be plotted using Gnuplot. The txt file should have numerical values in at least two columns. The first column is for x values.

Which library would you prefer for plotting in Python language?

matplotlib. matplotlib is the O.G. of Python data visualization libraries. Despite being over a decade old, it's still the most widely used library for plotting in the Python community.

What is plotting library in Python?

Plotly is a library that brings the power of interactive plotting with JavaScript to languages like Python and R. It is built with JavaScript and takes advantage of the powerful D3. js library. Using Plotly, we can create interactive plots in Python with only a few lines of code.


1 Answers

I think you are on the right track with gnuplot. For what you want, it's very powerful and flexible.

However, you may want to consider writing to gnuplot directly from your application instead of creating data and feeding it. There is an ANSI C API to gnuplot available.

like image 87
Reed Copsey Avatar answered Oct 17 '22 06:10

Reed Copsey