Page **1** of **1**

### Code to graph series in multiple frequencies

Posted: **Mon Mar 18, 2019 1:37 pm**

by **BT454**

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

### Re: Code to graph series in multiple frequencies

Posted: **Mon Mar 18, 2019 2:18 pm**

by **EViews Gareth**

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

### Re: Code to graph series in multiple frequencies

Posted: **Wed Mar 20, 2019 9:43 am**

by **BT454**

Thank you very much!

One more question:

How would I make one series a bar, and the other series a line?

Thanks again,

Bob

### Re: Code to graph series in multiple frequencies

Posted: **Wed Mar 20, 2019 9:47 am**

by **EViews Gareth**

### Re: Code to graph series in multiple frequencies

Posted: **Wed Mar 20, 2019 10:06 am**

by **BT454**

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!

### Re: Code to graph series in multiple frequencies

Posted: **Wed Mar 20, 2019 3:32 pm**

by **EViews Jason**

Unfortunately with mixed graphs, we do not support mixed frequency plots. We look into possibly adding the feature in the future