Grafica de Exportaciones
library(ggplot2)
# Datos
paises <- c("EE.UU.", "Europa", "Japón", "Asia", "Mercado Común")
exportaciones <- c(2.1, 3.2, 1.4, 2.8, 0.9)
datos <- data.frame(Pais = paises, Exportaciones = exportaciones)
# Gráfica de barras
ggplot(datos, aes(x = Pais, y = Exportaciones, fill = Pais)) +
geom_bar(stat = "identity", color = "black") +
scale_fill_manual(values = c("#FF4500", "#FFD700", "#FF8C00", "#E2725B", "#FFE4B5")) +
theme_minimal(base_family = "Lora") +
theme(
plot.background = element_rect(fill = "#2E1A0F"),
panel.background = element_rect(fill = "#2E1A0F"),
text = element_text(color = "#FFD700"),
axis.text = element_text(color = "#FFE4B5"),
plot.title = element_text(family = "Playfair Display", size = 20, hjust = 0.5, color = "#FFD700"),
plot.subtitle = element_text(family = "Lora", size = 12, hjust = 0.5, color = "#FFE4B5"),
legend.position = "none"
) +
labs(
title = "Exportaciones por Región 2024",
subtitle = "Valores en miles de USD",
x = "",
y = ""
)
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
## not found in Windows font database
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
## not found in Windows font database
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
## not found in Windows font database
## Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family
## not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
## family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database
## Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
## font family not found in Windows font database

## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00