← Back to context

Comment by jeremyscanvic

5 hours ago

Is ggplot2 considered to be a nice interface to plot things compared to say matplotlib in Python? I'm asking out of curiosity, I haven't touched R much

Yes, ggplot2 is lovely to work with for complex graphs. Whereas a classic plotting library will have one function to create a bar graph, another to create a line graph, etc., in ggplot instead you can stack layers, each with different properties, variables, shapes, data-dependent colors, scales, whatever you want. It also makes it easy to create grids of similar graphs.

The "grammar of graphics" conceptualized in ggplot is a very cohesive way to make (I think almost) any kind of graph, while remaining a high-level language/DSL.