Page 1 of 1

More than one grid and change color

Posted: Sun Mar 31, 2019 3:02 pm
by Max Resende
To all RATS users,

I am new at RATS and I am bumping into a few problems.

How can I add more than one grid at my graph and change the the grid color line or size? The grid line gets confused with the graph line.

Thats my code that i tried to use following RATS Hel guide page 141

Code: Select all

set shocks = t==2010:04:20.or.$ 
              t==2011:02:17.or.$
              t==2012:06:03
spgraph(hfields=2,color=2,footer="Figure 1 Cotações e Rettornos do Petróelo WTI")
graph(grid=shoks,header="(a) Oil Price (US$/barril)")
# close
graph(grid=shocks,header="(b) Oil return (%)")
# r
spgraph(done)
This is the error message that I get:
# SX11. Identifier SHOKS is Not Recognizable. Incorrect Option Field or Parameter Order?
>>>>graph(grid=shoks,<<<<
Thank you all.

Max

Re: More than one grid and change color

Posted: Sun Mar 31, 2019 4:11 pm
by TomDoan
That error message is rather self-explanatory. You typed SHOKS when you meant SHOCKS.

I'm not sure what you're trying to do with more than one grid, but no, you can only do one grid. You can do a separate shading option. You can change the color or pattern of those using GRPARM:

https://estima.com/ratshelp/stylesheets.html

There is no "COLOR" option on SPGRAPH---COL will be interpreted as the COLUMNS option, which you really don't want.

Re: More than one grid and change color

Posted: Sun Mar 31, 2019 4:29 pm
by Max Resende
TomDoan wrote:That error message is rather self-explanatory. You typed SHOKS when you meant SHOCKS.

I'm not sure what you're trying to do with more than one grid, but no, you can only do one grid. You can do a separate shading option. You can change the color or pattern of those using GRPARM:

https://estima.com/ratshelp/stylesheets.html

There is no "COLOR" option on SPGRAPH---COL will be interpreted as the COLUMNS option, which you really don't want.
You are right. The output window teels me where the mistake is.

Thank you Tom.