reading data

For questions and discussion related to reading in and working with data.

reading data

Postby luxu1983 » Tue Feb 09, 2010 11:07 am

dear

when can i graph the series that is undated(not regular freguency day per period), how can i set the x-axis be time axis ? :D

thank you very much
luxu1983
 
Posts: 67
Joined: Wed Aug 12, 2009 10:53 pm

Re: reading data

Postby TomDoan » Tue Feb 09, 2010 1:23 pm

A graph will have a time sequence on the x-axis. It will only label it with dates if there's a calendar in use. What are you hoping to do? Sometimes you can get more flexible labelling by using the SCATTER instruction which has the XLABELS option. Note, however, that that assumes regular intervals.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: reading data

Postby luxu1983 » Tue Feb 09, 2010 1:57 pm

dear sir
because my data is udated i do not know how import the "time sequence"
i import my data in this way
"
Cal(Irregular)
COMPUTE GSTART=1, GEND =10
all gend
Open Data data.xls
data(format=xls,org=cols)
"
now i want graph the series including the time sequence on the x-axis
my data is like this in excel

time xx
4/29/2005 7.103486523
5/09/2005 7.079100145
5/10/2005 7.083303951
5/11/2005 7.07335446
5/12/2005 7.055079857
5/13/2005 7.058362545
5/16/2005 7.047438957
5/17/2005 7.051102092
5/18/2005 7.054164643
5/19/2005 7.054596452
5/20/2005 7.050798788
5/23/2005 7.024684617
luxu1983
 
Posts: 67
Joined: Wed Aug 12, 2009 10:53 pm

Re: reading data

Postby TomDoan » Tue Feb 09, 2010 8:10 pm

luxu1983 wrote:dear sir
because my data is udated i do not know how import the "time sequence"
i import my data in this way
"
Cal(Irregular)
COMPUTE GSTART=1, GEND =10
all gend
Open Data data.xls
data(format=xls,org=cols)
"
now i want graph the series including the time sequence on the x-axis
my data is like this in excel

time xx
4/29/2005 7.103486523
5/09/2005 7.079100145
5/10/2005 7.083303951
5/11/2005 7.07335446
5/12/2005 7.055079857
5/13/2005 7.058362545
5/16/2005 7.047438957
5/17/2005 7.051102092
5/18/2005 7.054164643
5/19/2005 7.054596452
5/20/2005 7.050798788
5/23/2005 7.024684617


If you read that as:

Code: Select all
Cal(Irregular)
COMPUTE GSTART=1, GEND =10
all gend
Open Data data.xls
data(format=xls,org=cols) / xxx


you'll get the first 10 entries (through 5/19) in order.

With big gaps like that, you can't sensibly label a graph with dates. If you think it would help, you can use shading or grid lines (SHADING and GRID options) to distinguish months. But you would have to know which entries are in each month. You can use Excel functions to break the dates up to give separate year and month series.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm

Re: reading data

Postby luxu1983 » Wed Feb 10, 2010 1:17 pm

dear
Are there another methods to read the data including the time sequence even if the gaps existing?
thank you very much
luxu1983
 
Posts: 67
Joined: Wed Aug 12, 2009 10:53 pm

Re: reading data

Postby TomDoan » Wed Feb 10, 2010 1:27 pm

No. If you need the dates broken down for data with gaps, you need to add series to the data file for them. If you already have the dates coded as Excel dates, the Excel year, month and day functions handle that quite easily.
TomDoan
 
Posts: 2720
Joined: Wed Nov 01, 2006 5:36 pm


Return to Data: Reading, Writing, Transforming

Who is online

Users browsing this forum: No registered users and 1 guest

cron