Page 1 of 1

reading data

Posted: Tue Feb 09, 2010 10:07 am
by luxu1983
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

Re: reading data

Posted: Tue Feb 09, 2010 12:23 pm
by TomDoan
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.

Re: reading data

Posted: Tue Feb 09, 2010 12:57 pm
by luxu1983
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

Re: reading data

Posted: Tue Feb 09, 2010 7:10 pm
by TomDoan
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.

Re: reading data

Posted: Wed Feb 10, 2010 12:17 pm
by luxu1983
dear
Are there another methods to read the data including the time sequence even if the gaps existing?
thank you very much

Re: reading data

Posted: Wed Feb 10, 2010 12:27 pm
by TomDoan
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.