Hi!
Is there code available to graph series of different frequency types on one graph?
For instance I'd like plot of line graph of daily price data on the right axis, and a bar graph of weekly natural gas data on the left axis, on the same graph.
Thanks!
Bob
Code to graph series in multiple frequencies
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Code to graph series in multiple frequencies
Code: Select all
wfcreate(page=q) a 1990 2020
series y=rnd*100
pagecreate(page=m) m 1990 2020
series x=rnd*10
copy(link) q\y m\y
group g y x
freeze(mygraph) g.line
mygraph.setelem(2) axis(r)
mygraph.axis overlap 'this is optional depending on your feelings
show mygraph
Follow us on Twitter @IHSEViews
Re: Code to graph series in multiple frequencies
Thank you very much!
One more question:
How would I make one series a bar, and the other series a line?
Thanks again,
Bob
One more question:
How would I make one series a bar, and the other series a line?
Thanks again,
Bob
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Code to graph series in multiple frequencies
Thanks,
When I use the code:
freeze(mygraph) g.mixed bar(sdfyinvusl48) line(pnhh)
to create a mixed graph the series I'd like to keep in daily (pnhh) converts to weekly.
Is there a way to use this command and keep the series pnhh as daily frequency, and not convert to weekly?
Here is the full code:
copy(link) daily\pnhh comps\pnhh
group g sdfyinvusl48 pnhh
freeze(mygraph) g.mixed bar(sdfyinvusl48) line(pnhh)
mygraph.setelem(1) axis(l)
mygraph.setelem(2) axis(r)
mygraph.axis overlap
please note, if i replace the freeze command above with this:
freeze(mygraph) g.line
the pnhh series stays in daily frequency and does not convert to weekly.
Thanks!
When I use the code:
freeze(mygraph) g.mixed bar(sdfyinvusl48) line(pnhh)
to create a mixed graph the series I'd like to keep in daily (pnhh) converts to weekly.
Is there a way to use this command and keep the series pnhh as daily frequency, and not convert to weekly?
Here is the full code:
copy(link) daily\pnhh comps\pnhh
group g sdfyinvusl48 pnhh
freeze(mygraph) g.mixed bar(sdfyinvusl48) line(pnhh)
mygraph.setelem(1) axis(l)
mygraph.setelem(2) axis(r)
mygraph.axis overlap
please note, if i replace the freeze command above with this:
freeze(mygraph) g.line
the pnhh series stays in daily frequency and does not convert to weekly.
Thanks!
-
- EViews Developer
- Posts: 870
- Joined: Tue Sep 16, 2008 3:50 pm
Re: Code to graph series in multiple frequencies
Unfortunately with mixed graphs, we do not support mixed frequency plots. We look into possibly adding the feature in the future
Who is online
Users browsing this forum: No registered users and 45 guests