LA1

Author

Ashutosh

# Required libraries
library(ggplot2)
library(dplyr)

Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
# Data for 2021–2025
tax_data <- data.frame(
  Year = rep(2021:2025, 4),
  Slab = rep(c("Up to 2.5L", "2.5L–5L", "5L–10L", "10L+"), each = 5),
  Rate = c(
    rep(0, 5),                      
    rep(5, 5),                      
    rep(15, 5),                     
    c(30, 30, 25, 25, 25)           
  )
)

ggplot(tax_data, aes(x = Year, y = Rate, color = Slab, group = Slab)) +
  geom_step(size = 1.2, direction = "hv") +
  labs(
    title = "Income Tax Slab Rate Changes (2021–2025)",
    x = "Year",
    y = "Tax Rate (%)",
    color = "Income Slab"
  ) +
  theme_minimal(base_size = 14) +
  theme(
    panel.grid.minor = element_blank(),
    legend.position = "top"
  )
Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.