def plot_a_graph():
    f, a = plt.subplots(1)
line = plt.plot(list(range(10)))
print(multiprocessing.current_process().name, 'starting plot show process')
plt.show()
print(multiprocessing.current_process().name, 'plotted graph')
time.sleep(4)
job_for_another_core = multiprocessing.Process(target=plot_a_graph, args=())
job_for_another_core.start()
print(multiprocessing.current_process(
    ).name, 'The main process is continuing while another process deals with plotting.')
Графика с помощью matplotlib в потоках