Skip to content

Commit 2ec9c6d

Browse files
author
Daniel Ruprecht
committed
added title to generated plots
1 parent 1961111 commit 2ec9c6d

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/fwsw/plot_stability.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727
pparams['u0'] = 1.0
2828
swparams = {}
2929
swparams['collocation_class'] = collclass.CollGaussLobatto
30-
swparams['num_nodes'] = 2
31-
K = 2
30+
swparams['num_nodes'] = 4
31+
K = 5
3232

3333
#
3434
# ...this is functionality copied from test_imexsweeper. Ideally, it should be available in one place.
@@ -80,8 +80,9 @@
8080
plt.gca().set_xticks([0.0, 1.0, 2.0, 3.0])
8181
plt.gca().tick_params(axis='both', which='both', labelsize=fs)
8282
plt.xlim([np.min(lambda_s.imag), np.max(lambda_s.imag)])
83-
plt.xlabel('$\Delta t \lambda_{slow}$', fontsize=fs, labelpad=0.0)
83+
plt.xlabel('$\Delta t \lambda_{slow}$', fontsize=fs, labelpad=2.0)
8484
plt.ylabel('$\Delta t \lambda_{fast}$', fontsize=fs)
85+
plt.title(r'$M=%1i$, $K=%1i$' % (swparams['num_nodes'],K), fontsize=fs)
8586
filename = 'sdc-fwsw-stability-K'+str(K)+'-M'+str(swparams['num_nodes'])+'.pdf'
8687
fig.savefig(filename, bbox_inches='tight')
8788
call(["pdfcrop", filename, filename])

0 commit comments

Comments
 (0)