I plotting some data using octave

Click For Summary
SUMMARY

This discussion focuses on plotting data using Octave, specifically converting data from a text file into an XY scatter plot. The user seeks to incorporate error bars into their plots, which include measurement errors for both angle and intensity. The solution provided involves using GNUPlot with the command: plot "gnudem.txt" using 1:2:3:4 with xyerrorbars, which effectively displays error bars for the specified data points.

PREREQUISITES
  • Familiarity with Octave for data visualization
  • Understanding of data formatting in text files
  • Basic knowledge of error bars in data plotting
  • Experience with GNUPlot for advanced plotting techniques
NEXT STEPS
  • Learn how to import data files in Octave
  • Explore Octave's built-in functions for creating XY scatter plots
  • Research error bar plotting techniques in Octave
  • Study advanced plotting options in GNUPlot for enhanced visualizations
USEFUL FOR

This discussion is beneficial for data analysts, researchers, and scientists who need to plot datasets with error bars using Octave and GNUPlot, particularly those interested in polar plotting techniques.

richyw
Messages
179
Reaction score
0
Hi, I'm having a lot of trouble finding a tutorial that would allow me to plot a set of data using octave. Everything seems to be teaching me how to plot functions.

but say I have a list of data saved in a text file. How do I turn this into an xy scatter? Is this possible using octave?

I can do this easily using other programs, but they do not have built in polar plot functions, so I always have to convert them to cartesian graphs. I know how to plot polar functions in octave, so was hoping that if I learned how to plot datasets I could turn them into polar plots easily.

thanks!
 
Physics news on Phys.org
alright I have figured out everything EXCEPT how to get in error bars. I have my measurement error values in both the angle, and intensity. They are in this format in my .dat file

angle intensity angle-error intensity-error

any thoughts on how to get these showing? I can't get them showing in gnuplot either...
 
You should have some success with GNUPlot using:

Code:
plot "gnudem.txt" using 1:2:3:4  with xyerrorbars
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 12 ·
Replies
12
Views
7K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K