Description Usage Arguments Value Author(s) References
View source: R/grafica_ribbon.R
The function "grafica_ribbon" For each x value, displays a "y" interval defined by ymin and ymax
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | grafica_ribbon(
df,
x_axis,
y_axis,
fill_C,
is_date = F,
is_num = F,
is_word = F,
size_line = 1.5,
size_point = 2,
legend_position = "right",
legend_title = "",
x_t = "",
y_t = "",
y_position = "right",
formato_fecha = "%m-%Y",
titulo = "",
subtitulo = "",
break_x = "8 week",
t_hjust = 0,
s_hjust = 0,
point = F,
line_v = F,
x_int,
f_wrap = F,
f_wrap_1,
scales_fw = T,
add_ribbon = F,
y_axis_r,
ribbon_col = "grey70",
ribbon_alpha = 1,
rint,
size_t = 9,
size_s = 9,
size_x_t = 7,
size_y_t = 7,
size_l = 7,
size_lt = 7,
size_x_axis = 9,
size_y_axis = 9,
font_t = "Calibri",
font_s = "Calibri",
font_l = "Calibri",
font_x = "Calibri",
font_y = "Calibri",
font_lt = "Calibri",
col_t = colores[12],
col_s = colores[12],
angle_x = 0,
angle_y = 0,
x_axis_tf = "plain",
y_axis_tf = "plain",
x_axis_f = "plain",
y_axis_f = "plain",
line_alpha = 1,
vline_alpha = 1,
add_text = F,
n_decimal = 2,
size_text = 3.5,
font_text = "plain",
textp_y = 0.04,
text_hjust = -0.25,
escala = F,
ay,
by
)
|
df |
Default dataset to use for plot. If not already a data.frame, will be converted to one by fortify(). If not specified, must be supplied in each layer added to the plot. |
x_axis |
data of variable x |
y_axis |
variable to be plotted |
fill_C |
color fill |
is_date |
if x-axis format are dates |
is_num |
if x-axis format is numeric |
is_word |
if x-axis format are words |
size_line |
line size, numeric value |
size_point |
point size, numeric value |
legend_position |
Position adjustment of the legend |
legend_title |
Legend title to graph, as character |
x_t |
x axis title to graph, as character |
y_t |
y axis title to graph, as character |
y_position |
Position of y axis, ie. ("right","left) |
formato_fecha |
date format |
titulo |
Title to graph, as character |
subtitulo |
Subtitle to graph, as character |
break_x |
x axis partitions |
t_hjust |
Title position, values between [0,1] |
s_hjust |
Subtitle position, values between [0,1] |
point |
If point = T, then add a point to the line graph |
line_v |
if line_v=T, then add a vertical line |
x_int |
Date where the vertical line will be placed |
f_wrap |
if f_wrap=T, then facet_wrap() function will be activate |
f_wrap_1 |
variables to graph |
scales_fw |
scales of the variables graphed |
add_ribbon |
If add_ribbon = T, then ribbon format will be added to a time series |
y_axis_r |
variable to be plotted for ribbon interval |
ribbon_col |
color of the Ribbon area |
ribbon_alpha |
ribbon opacity |
rint |
Value that is subtracted from y_axis_r to obtain the interval defined by ymin and ymax |
size_t |
title font size |
size_s |
subtitle font size |
size_x_t |
x-axis title font size |
size_y_t |
y-axis title font size |
size_l |
legend title font size |
size_lt |
legend text font size |
size_x_axis |
x-axis text font size |
size_y_axis |
x-axis text font size |
font_t |
title font style |
font_s |
subtitle font style |
font_l |
legend font style |
font_x |
x-axis font style |
font_y |
y-axis font style |
font_lt |
legend text font style |
col_t |
title color |
col_s |
subtitle color |
angle_x |
angle of x-axis text |
angle_y |
angle of y-axis text |
x_axis_tf |
title bold,plain, etc |
y_axis_tf |
subtitle bold,plain, etc |
x_axis_f |
bold,plain, etc |
y_axis_f |
bold,plain, etc |
line_alpha |
line plot opacity |
vline_alpha |
vline opacity |
add_text |
add text labels |
n_decimal |
number of decimals to graph |
size_text |
labels text font size |
font_text |
labels font size |
textp_y |
adjust text alignment |
text_hjust |
adjust text alignment, values in [0,1] |
escala |
adjust y-axis scale |
ay |
y-axis scale lower limit |
by |
y-axis scale upper limit |
Ribbon plot with Banxico format
Marcos Daniel Ramirez Santiago, danielrs98@outlook.com
Ggplot2: Elegant Graphics for Data Analysis
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.