Matplotlib and Me

I’m having a bit of a difficult time understanding Dataquest’s Exploratory Data Visualization, its module on Matplotlib, beyond the obvious points of Matplotlib being a visualization tool with available customizations.

DQ’s approach seems to be a little more focused on methods, and doing x, y, and z, and look there’s a graph!, and not so much about the conceptual stuff — the visualization philosophy behind MPL, why MPL is the way it is, and what’s really happening in the background.

MPL’s syntax also feels a bit weird to me. It seems more procedural than object-oriented, and that makes it a bit jarring in my mind. For instance, having to write a bunch of one-liner methods such as:

fig, ax = plt.subplots()

ax.scatter(
reviews['Fandango_Ratingvalue'], reviews['RT_user_norm']
)

plt.xlabel('Fandango')
plt.ylabel('Rotten Tomatoes')

plt.show()

is quite confusing. Still hungover from Pandas and Numpy, I keep trying to method chain the (bleep) out of figures and axes, and it seem to not work that way. I keep thinking about it in terms of HTML and CSS, specifically on how HTML objects / containers can be customizable through CSS classes, which resonate conceptually with Python’s.

Also, armed with an increased comfort level in Jupyter notebooks, I tried replicating the exercises in DQ in Jupyter and found myself more confused because DQ does some scripting short cuts in the background without being very explicit about those. I’m sure they have their reasons, but it results to an inconsistent experience when trying to understand the programmatic flow of commands.

Frustrated by my incapacity to method chain, and the differences between Jupyter and DQ’s console, I bumped into a few cool things, such as Jake VanderPlas’ GitHub repo, HTML5 Canvas, and r/place. These discoveries, and more randomness are things I plan to talk about in my first ever Round Up post.