I want to make a PDF of a question sheet. So I want to print a question, and then a block of empty grey boxes where the students fill in their answers.
I'm having trouble making the plot of empty grey squares. I thought one way to do it would be (1) to make a plot with some random data, (2) remove the data and the labels etc, (3) justify the plot so it stretches over the whole width of the page
This code:
import matplotlib.backends.backend_tkagg
import matplotlib
from matplotlib import pyplot as plt
import matplotlib.style
matplotlib.use("MacOSX")
time = [0,1,2,3] #dummy x axis
position = [0,100,200,300] # dummy y axis
plt.style.use('ggplot')
f = plt.figure()
plt.plot(time, position) #plot it
plt.xticks(time," ") #tried to remove the x-axis labels AND TICKS
plt.show()
So I would know how to remove the y-axis words (plt.yticks,position, " ") but not how to remove the actual plot. The answers I've seen work elsewhere e.g. here don't seem to work.
Ideally can someone show me either (1) how to print a small (e.g. 1/6th of an A4 page) of grey squares to a PDF, or if not (2) how to actually remove the line from the below graph (doing plt.plot() also removed the grey squares).
I'm not sure if this would matter to the answer (i.e. combining text and picture?) but the ultimate aim would be for 4 strings, to print string, then empty grey boxes, string, empty grey boxes ; like a standard worksheet/exam paper style.