How do I remove legend/grid without using theme_void()?

Solution 1:

EDIT: Updated as you have posted an image. You do not have a legend, so you do not need to remove it. You want to remove the axis lines, ticks, text, title and maybe(?) the panel grid lines:

pic <- ggplot(data = art_dat, mapping = aes(x = x, y = y, group = path_id,
                                                color = step_id)
              ) + 
  geom_path(
            size = .9,
            alpha = 1000, #transparency of the lines
            show.legend = FALSE
                        
            ) +
            coord_equal() + 
            theme_light() + 
            scale_color_scico(palette = "berlin") +
                theme(
        axis.line = element_blank(), 
        axis.text = element_blank(),
        axis.ticks = element_blank(),
        axis.title = element_blank(),
        panel.grid.major = element_blank(), # optional - remove gridlines
        panel.grid.minor = element_blank() # optional - remove gridlines
    )