I use c to program. plot them with other software like IDL or origin.

In summary, the conversation discusses different methods for plotting data in programming. The first person mentions using C and writing data to files, but is tired of constantly opening files while debugging. The second person suggests using Numerical Recipes 3rd Edition, which has a solution for automatically creating graphs in a pop up window. They also suggest using GSview.exe and purchasing the book for more information. Another person suggests using gnuplot and running it as an external program to generate a graph from a temporary file.
  • #1
enricfemi
195
0
I use c to program. Usually, I write the data to files and plot them with other software like IDL or origin. but I really tired of it, since i need open a file thousands times while debug.

Is there any better method to plot the data. which methods do you use?
 
Physics news on Phys.org
  • #2


Yes there is a much better way. I too have had to do the same thing until I found a solution in Numerical Recipes 3rd Edition. You will have to purchase the book or the source code but chapter 22 has a PSplot and PSpage routine that can be used to create graphs that open up automatically in a pop up window. You will need to download the GSview.exe from Ghostview also. The book is really worth the price.

Hope this helps.
 
  • #3


You can write data to a file, then from your C program run a separate program to generate a graph from the file and open it in a window. I use gnuplot.
 
  • #4


Get gnuplot. Learn how to run external programs from c. Make a function that writes a temp file and run gnuplot over it.
 
  • #5


Thx.
 

1. What is the difference between using C to program and other software like IDL or origin?

C is a high-level programming language that is widely used for developing operating systems, embedded systems, and other complex software. It is a general-purpose language, meaning it can be used for a wide range of applications. IDL and Origin, on the other hand, are specific software programs used for data analysis and visualization. While C is used for writing code, IDL and Origin are used for analyzing and displaying data.

2. Can I use C to program and then import the data into IDL or Origin for plotting?

Yes, you can use C to program and then import the data into IDL or Origin for plotting. C is a flexible language that allows you to manipulate data and save it in various formats. You can then import this data into IDL or Origin to create plots and visualizations.

3. Are there any advantages to using C for programming and IDL or Origin for plotting?

Yes, there are several advantages to using this combination. C is a powerful language that allows for complex data manipulation and processing, while IDL and Origin are specialized software programs designed specifically for data analysis and visualization. By using both, you can take advantage of the strengths of each program to create high-quality plots and visualizations.

4. Is it difficult to learn how to use C and IDL or Origin together?

The difficulty in learning how to use C and IDL or Origin together will depend on your current programming knowledge and experience. If you are familiar with C, then learning how to use IDL or Origin for plotting should not be too difficult. However, if you are new to both languages, it may take some time to learn the syntax and functions for each.

5. Can I use other software besides IDL or Origin for plotting my data with C?

Yes, there are many other software programs available for data visualization and plotting. Some popular options include MATLAB, Python, and R. These programs also have the capability to work with C, allowing you to create plots and visualizations using your preferred programming language.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
4K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • Programming and Computer Science
Replies
11
Views
2K
  • Special and General Relativity
Replies
5
Views
3K
  • STEM Career Guidance
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
20
Views
3K
Back
Top