Create a grid on the top of a graph

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

johansamuelsson
Posts: 165
Joined: Thu Mar 03, 2011 10:07 pm
Contact:

Create a grid on the top of a graph

Postby johansamuelsson » Mon Dec 15, 2014 11:15 pm

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

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Create a grid on the top of a graph

Postby EViews Jason » Tue Dec 16, 2014 9:46 am

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


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests