eco.plot | R Documentation |
Generates beautiful economic plots with built in recession bars
eco.plot(plot_type, df,x,y1,y2,y3,ycolor1,ycolor2,ycolor3,subtitle,y.title,x.title,title,caption,legend.pos,date.break, date.format,line.size,yaxis.text.size,xaxis.text.size,title.size,caption.size,legend.size, axis.title.size, bar.position)
plot_type |
Type of plot to display (line, bar, dual line, tri line, etc) |
df |
Dataframe containing the data to be plotted |
x |
Name of column to be used as x axis. This should be a string. |
y1 |
First y axis |
y2 |
Second y axis (if applicable) |
y3 |
Third y axis (if applicable) |
ycolor1 |
First y axis color |
ycolor2 |
Second y axis color |
ycolor3 |
Third y axis color |
subtitle |
Subtitle Text |
y.title |
Y Axis Title |
x.title |
X Axis Title |
title |
plot title |
caption |
Caption Text |
legend.pos |
Set location of the legend. This is a string. Default is 'top' |
date.break |
X Axis date seperator. Should be string. Ex. '2 years' |
date.format |
Month Numeric: ' \itemline.sizeSet size of line. Default is .7 \itemyaxis.text.sizeSet size of y Axis text. Default is 15 \itemxaxis.text.sizeSet size of x Axis text. Default is 15 \itemtitle.sizeSet size of title. Default is 20 \itemcaption.sizeSet size of caption. Default is 13 \itemlegend.sizeSet size of legend. Default is 15 \itembar.positionBar type ie stacked, fill, dodge \itemfillBar chart fill |
Returns a single series plot soloemoon@gmail.com
fred.keys <-c('UNRATE','PAYEMS') monthly.indicators <-eco.monthly(fred.keys, key.rename,'w')
eco.plot(plot_type ='line',df=monthly.indicators, x='date',y='UNRATE',subtitle = 'sample plot',y.title='
aplot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.