Reproducing Matlab graph in Eviews

For questions regarding the import, export and manipulation of data in EViews, including graphing and basic statistics.

Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator

antipa
Posts: 14
Joined: Tue Apr 16, 2013 9:47 am

Reproducing Matlab graph in Eviews

Postby antipa » Wed Jul 24, 2019 4:03 am

Dear all,

Using Eviews 10, I would like to reproduce the Matlab graph attached. I also include my Matlab code below.

I would like to display the debt-to-GDP ratio on the abscissa and the interest rate on the ordinate. For each war in my sample, I would like to display two points. The lower coordinates are the initial debt-to-GDP ratio and interest rate; the higher coordinates are the final debt-to-GDP ratio and the highest interest rate. Finally, I would like to link these two points through a line.

Many thanks in advance, Pamfili

clear all
x=[
72.75 3
105.59 3.9
100.55 3
157.24 4.2
106.26 3.3
152.9 5.3
122.4 3.2
157.16 6];


i=1;
d1=[x(i,1)/100 x(i+1,1)/100];r1=[x(i,2) x(i+1,2)]
i=3;
d2=[x(i,1)/100 x(i+1,1)/100];r2=[x(i,2) x(i+1,2)];
i=5;
d3=[x(i,1)/100 x(i+1,1)/100];r3=[x(i,2) x(i+1,2)];
i=7;
d4=[x(i,1)/100 x(i+1,1)/100];r4=[x(i,2) x(i+1,2)];


beginx=[x(1,1) x(3,1) x(5,1) x(7,1)]./100;
beginy=[x(1,2) x(3,2) x(5,2) x(7,2)];




plot(d1,r1,d2,r2,d3,r3,d4,r4,.6,2.5,2.6,7,2.6,5.6,'o')%, beginx, beginy,'o')
text(.72,3.15,'1743')
text(1,3.8,'1748')
text(1,3.1,'1756')
text(1.5,3.85,'1763')
text(1.02,3.5,'1776')
text(1.5,5,'1783')
text(1.2,3.1,'1792')
text(1.5,5.85,'1797')
text(2.2,5.85,'1818')


%plot(d2,r2)
%plot(d3,r3)
%plot(d4,r4)
%hold
Attachments
figdebtrates.pdf
(7.42 KiB) Downloaded 21 times

Return to “Data Manipulation”

Who is online

Users browsing this forum: No registered users and 4 guests