# I plotting some data using octave

• richyw
In summary, the speaker is having trouble finding a tutorial on how to plot a set of data using octave. They are specifically looking for a way to plot xy scatter data and add error bars. They hope that by learning how to plot datasets in octave, they can easily turn them into polar plots. They also mention that they have tried using other programs but they do not have built-in polar plot functions. The suggested solution is to use GNUPlot with the command "plot "gnudem.txt" using 1:2:3:4 with xyerrorbars".
richyw
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!

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

## 1. What is Octave and how is it used for data plotting?

Octave is an open-source programming language and software package that is used for scientific computing and data analysis. It has a built-in plotting functionality that allows users to create graphs and charts from their data.

## 2. How do I import my data into Octave for plotting?

There are several ways to import data into Octave, including using the "load" command for text or CSV files, or the "readtable" command for Excel files. You can also manually enter data using arrays or matrices.

## 3. What types of plots can I create with Octave?

Octave has a variety of plot types, including line graphs, bar charts, scatter plots, histograms, and more. You can also customize your plots by adding labels, legends, and changing the color and style of your data points.

## 4. How can I save my plots in Octave?

You can save your plots as image files (such as PNG or JPG) by using the "print" command. You can also save your plots as PDF or EPS files for higher quality prints.

## 5. Is Octave compatible with other programming languages?

Octave is compatible with other languages such as MATLAB, which means you can easily transfer code and data between the two programs. It also has interfaces for other languages like Python, making it a versatile tool for data analysis and plotting.

• MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
6
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
12
Views
5K
• MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
3K
• MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
903
• MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
537
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
990
• MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
• MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K