Page 1 of 1

Create a grid on the top of a graph

Posted: Mon Dec 15, 2014 11:15 pm
by johansamuelsson
Hi

I have problem to create a grid on the top of my Graph. For example creating a graph like

Code: Select all

WfCreate u 100 Series x = Rnd Graph g1 x
and put frame axes on left, right and bottom like

Code: Select all

g1.options frameaxes(lrb)
and then put a grid on top of the graph via

Code: Select all

g1.options gridontop
This does not create any grid on top?

I tried as well to draw a line on the top via the command

Code: Select all

g1.draw(line, left, color(red), top)
Nor this seems to work. Any suggestions?

Regards Johan

Re: Create a grid on the top of a graph

Posted: Tue Dec 16, 2014 9:46 am
by EViews Jason
The gridontop option is a modifier to activated gridlines. You must turn on a grid line to see an effect.

for example:

Code: Select all

g1.options gridl gridauto gridontop
has a different effect than

Code: Select all

g1.options gridl gridauto -gridontop
For the line, you need to specify a location for the line

Code: Select all

g1.draw(line, left, color(red), top) .7