help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Read a CSV file and plot a graph


From: Ron . Simonson
Subject: Re: Read a CSV file and plot a graph
Date: Mon, 4 Jun 2018 09:08:12 -0700
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0

On 06/04/2018 07:18 AM, Renato S. Yamane wrote:
Hi,

Please, is there an way to read a CSV file and split it to plot 2 graphics?

===== This is the conntent of the CSV file =====
Graph A
displacement,weight
0, 0
1, 20
2, 40
3, 60
4, 80
5, 100
Graph B
displacement,weight
0, 0
1, 15
2, 30
3, 45
4, 60
5, 75
==================================================

I looking for a way to make 2 graphs (A e B) with the datas that is
available in a single file...

Perhaps this will get you started.  I generally put a '#' comment
character at the begging of comment lines as shown in the example
data file.  Then it is easy to use the .m file shown here to do
something close to what you are asking for.  There are certainly
methods within octave to read files line by line and decipher what
each line contains but the attached is simple, and quick so this
is what I will often do.

Others will undoubtedly provide you with much better solutions
but hopefully this will get you started.

Talk to you later.  Ron.

Attachment: mydata.text
Description: application/extension-text

Attachment: rceprog.m
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]