
Make up a scenario and ask yourself, is it relevant? Does it give another layer to the character? If not, how can we give it importance? Do tasks like shining their shoes or eating breakfast give the reader insight into their personality? How can we make it so? Sit down, think about your character(s) and ask yourself, what's something that would happen in their life when they're not running in a bee-line towards the end of the book? I have no doubt that for some it's easy to sit down, write, and be able to knock out a 50k draft on inspiration alone but, if you're like me, writing begins to get tedious after you've gotten to the 8k mark and realised that, really, it's nothing more than a beefed up outline of the character getting from point A to point Z with none of the letters in-between. The main 'happenings' of most books don't come until the end. Writing and planning a clear subplot (or several) is just as important as planning the overall plot of your story, whether it's long, or short, or somewhere in between.Īfter taking time away from writing to sit down and properly start reading, ie taking the time to focus on structure and layout of a variety of different books, I realised that I'd forgotten one of the core lessons that I'd learnt about writing the second my 5-year-old self sat down in school. You can also achieve higher flexibility using ‘gridspec’ and ‘subplots’, see details here.After falling face-first into a rut these past weeks, I've emerged with something so simple and basic that I'm honestly hitting myself over the fact that it never came to me before. Plt.subplots() is recommended for generating multiple subplots in grids. (I personally prefer this for individual plot). You can see artist tutorial for more details. Plt.figure() is usually used when you want more customization to you axes, such as positions, sizes, colors and etc. Most of the kwargs that plt.figure takes plt.subplots also takes. Plt.figure just creates a figure (but with no axes in it) whereas plt.subplots takes optional arguments (ex: plt.subplots(2, 2)) to create an array of axes in the figure. In matplotlib, we can plots in two ways like below: plt.figure(1,figsize=(400,8))Īnd though both are correct, they have their differences. Question 3: What is the difference between plt.subplots() and plt.figure() The combination of the correct Locator and Formatter gives very fine control over the tick locations and labels. The location of the ticks is determined by a Locator object and the ticklabel strings are formatted by a Formatter.

They take care of setting the graph limits and generating the ticks (the marks on the axis) and ticklabels (strings labeling the ticks). These are the number-line-like objects (circled in green). Each Axes has a title (set via set_title()), an x-label (set via set_xlabel()), and a y-label set via set_ylabel()). The Axes contains two (or three in the case of 3D) Axis objects (be aware of the difference between Axes and Axis) which take care of the data limits (the data limits can also be controlled via set via the set_xlim() and set_ylim() Axes methods).

A given figure can contain many Axes, but a given Axes object can only be in one Figure. This is what you think of as a plot, it is the region of the image with the data space (marked as the inner blue box).

In the context of matplotlib, axes is not the plural form of axis, it actually denotes the plotting area, including all axis. Question 2: Difference between “axes” and “axis” in matplotlib? This window will be just divided in 4 parts with my example.įigure2, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)

This plot 4 figures which are named ax1, ax2, ax3 and ax4 each one but on the same window. Or you can plot multiple figures like this: fig1, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2) Plot one or several figure(s) in the same window If you just want to get one graphic, you can use this way. Plot just one figure with (x,y) coordinates plt.plot(x, y) fig1, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2)Īfter reading through a bunch of stackoverflow explainations, I compiled them here: Question 1: What is the difference between drawing plots using plot, axes or figure in matplotlib? When working with python libraries, especially for visualization, I usually get confused my number of options available for plotting.
