Hello I would like to know If it is possible when doing a graph to assign alpha charecters to my y axis. I want to make a graph of the credit ratings of a country during time. I have already used the valmap function to attribute labels to my numeric values rating scale (i.e 24=AAA; 23=AA+). However when I do a graph on the y axis it still appears numbers instead of letters. Does anyone knows how to do this ?
Thanks a lot in advance for the help you might gave to me,
Artur
Credit Rating Graphs
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Credit Rating Graphs
I believe that cannot be done.
-
Artur Patricio
- Posts: 8
- Joined: Thu May 14, 2015 4:48 am
Re: Credit Rating Graphs
Hmm... I have seen that on the graph options - Axes & Scaling - Obs/Date - add custom obs labels - you can assing the letters to your X axis but I guess that we can do the same for the y axis. or not ?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Credit Rating Graphs
Cannot.
-
Artur Patricio
- Posts: 8
- Joined: Thu May 14, 2015 4:48 am
Re: Credit Rating Graphs
Hello again dear colleagues I just want to share with you the programming I have developed to solve my problem which was doing credit rating graphs. I discover a trick for doing such graphs. Below a share with you the commands I hope that it can be of help for the people that have the same problem.
%x="PT_RTG_SP"
%MYGROUP="GR_"+%x
%MYGRAPH="GRA_"+%x
group {%MYGROUP} PT_RTG_SP+0
Call graf_GR({%MYGROUP},240,%MYGRAPH)
{%MYGRAPH}.axis(left) range(10, 24)
{%MYGRAPH}.axis(left) -label grid zeroline
{%MYGRAPH}.addtext(T,textcolor(0,35,90),font(verdana,14,+b)) "Portugal – Rating S&P"
{%MYGRAPH}.addtext(-0.53,-0.11,textcolor(0,35,90),font(verdana,14,-b)) "AAA"
{%MYGRAPH}.addtext(-0.53, 0.14,textcolor(0,35,90),font(verdana,14,-b)) "AA+"
{%MYGRAPH}.addtext(-0.53, 0.36,textcolor(0,35,90),font(verdana,14,-b)) "AA"
{%MYGRAPH}.addtext(-0.53, 0.61,textcolor(0,35,90),font(verdana,14,-b)) "AA-"
{%MYGRAPH}.addtext(-0.53, 0.87,textcolor(0,35,90),font(verdana,14,-b)) "A+"
{%MYGRAPH}.addtext(-0.53, 1.11,textcolor(0,35,90),font(verdana,14,-b)) "A"
{%MYGRAPH}.addtext(-0.53, 1.35,textcolor(0,35,90),font(verdana,14,-b)) "A-"
{%MYGRAPH}.addtext(-0.53, 1.60,textcolor(0,35,90),font(verdana,14,-b)) "BBB+"
{%MYGRAPH}.addtext(-0.53, 1.85,textcolor(0,35,90),font(verdana,14,-b)) "BBB"
{%MYGRAPH}.addtext(-0.53, 2.11,textcolor(0,35,90),font(verdana,14,-b)) "BBB-"
{%MYGRAPH}.addtext(-0.53, 2.37,textcolor(0,35,90),font(verdana,14,-b)) "BB+"
{%MYGRAPH}.addtext(-0.53, 2.64,textcolor(0,35,90),font(verdana,14,-b)) "BB"
{%MYGRAPH}.addtext(-0.53, 2.87,textcolor(0,35,90),font(verdana,14,-b)) "BB-"
{%MYGRAPH}.addtext(-0.53, 3.13,textcolor(0,35,90),font(verdana,14,-b)) "B+"
{%MYGRAPH}.addtext(-0.53, 3.39,textcolor(0,35,90),font(verdana,14,-b)) "B"
{%MYGRAPH}.setelem(1) legend("Rating S&P") lwidth(1.5)
{%MYGRAPH}.datelabel format("yyyy:MM") interval(obs,24,)
{%MYGRAPH}.drawdefault shadecolor(@rgb(252,242,194) ) existing
show {%MYGRAPH}
%x="PT_RTG_SP"
%MYGROUP="GR_"+%x
%MYGRAPH="GRA_"+%x
group {%MYGROUP} PT_RTG_SP+0
Call graf_GR({%MYGROUP},240,%MYGRAPH)
{%MYGRAPH}.axis(left) range(10, 24)
{%MYGRAPH}.axis(left) -label grid zeroline
{%MYGRAPH}.addtext(T,textcolor(0,35,90),font(verdana,14,+b)) "Portugal – Rating S&P"
{%MYGRAPH}.addtext(-0.53,-0.11,textcolor(0,35,90),font(verdana,14,-b)) "AAA"
{%MYGRAPH}.addtext(-0.53, 0.14,textcolor(0,35,90),font(verdana,14,-b)) "AA+"
{%MYGRAPH}.addtext(-0.53, 0.36,textcolor(0,35,90),font(verdana,14,-b)) "AA"
{%MYGRAPH}.addtext(-0.53, 0.61,textcolor(0,35,90),font(verdana,14,-b)) "AA-"
{%MYGRAPH}.addtext(-0.53, 0.87,textcolor(0,35,90),font(verdana,14,-b)) "A+"
{%MYGRAPH}.addtext(-0.53, 1.11,textcolor(0,35,90),font(verdana,14,-b)) "A"
{%MYGRAPH}.addtext(-0.53, 1.35,textcolor(0,35,90),font(verdana,14,-b)) "A-"
{%MYGRAPH}.addtext(-0.53, 1.60,textcolor(0,35,90),font(verdana,14,-b)) "BBB+"
{%MYGRAPH}.addtext(-0.53, 1.85,textcolor(0,35,90),font(verdana,14,-b)) "BBB"
{%MYGRAPH}.addtext(-0.53, 2.11,textcolor(0,35,90),font(verdana,14,-b)) "BBB-"
{%MYGRAPH}.addtext(-0.53, 2.37,textcolor(0,35,90),font(verdana,14,-b)) "BB+"
{%MYGRAPH}.addtext(-0.53, 2.64,textcolor(0,35,90),font(verdana,14,-b)) "BB"
{%MYGRAPH}.addtext(-0.53, 2.87,textcolor(0,35,90),font(verdana,14,-b)) "BB-"
{%MYGRAPH}.addtext(-0.53, 3.13,textcolor(0,35,90),font(verdana,14,-b)) "B+"
{%MYGRAPH}.addtext(-0.53, 3.39,textcolor(0,35,90),font(verdana,14,-b)) "B"
{%MYGRAPH}.setelem(1) legend("Rating S&P") lwidth(1.5)
{%MYGRAPH}.datelabel format("yyyy:MM") interval(obs,24,)
{%MYGRAPH}.drawdefault shadecolor(@rgb(252,242,194) ) existing
show {%MYGRAPH}
Who is online
Users browsing this forum: No registered users and 2 guests
