Comment

Comment by zzleeper

A lot of people swear by ggplot and other grammar of graphics tools, so I have an open question. Let's take an example from the page:

  ggplot(data=mpg) +\
  geom_point(mapping=aes(x="displ", y="hwy", alpha="manufacturer"))
How much easier is that from

  g = ggplot(data=mpg)
  g.geom_point(mapping=aes(x="displ", y="hwy", alpha="manufacturer"))
Or, for instance:

  ggplot(mpg, aes("displ", "hwy")) +\
  geom_point(aes(color="class")) +\
  geom_smooth(se=False) +\
  labs(title="Fuel efficiency generally decreases with engine size")
VS:

  g = ggplot(mpg, aes("displ", "hwy"))
  g.geom_point(aes(color="class"))
  g.geom_smooth(se=False)
  g.title = "Fuel efficiency generally decreases with engine size"

What am I missing?
parent zzleeper 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton