Skip to content

Commit 8a96760

Browse files
committed
small edit in cheat sheet
1 parent a26bc02 commit 8a96760

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

notebooks/resources_python_cheat_sheet.ipynb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@
772772
"editable": true
773773
},
774774
"source": [
775+
"```python\n",
775776
"fig.suptitle('title') # big figure title\n",
776777
"fig.subplots_adjust(bottom=0.1,\n",
777778
" right=0.8,\n",
@@ -791,7 +792,8 @@
791792
"ax.legend(loc='upper center') # activate legend\n",
792793
"ax.grid(True, which='both') # activate grid\n",
793794
"bbox = ax.get_position() # returns the axes bounding box\n",
794-
"bbox.x0 + bbox.width # bounding box parameters"
795+
"bbox.x0 + bbox.width # bounding box parameters\n",
796+
"```"
795797
]
796798
},
797799
{
@@ -811,6 +813,7 @@
811813
"editable": true
812814
},
813815
"source": [
816+
"```python\n",
814817
"ax.plot(x,y, '-o', c='red', lw=2, label='bla') # plots a line\n",
815818
"ax.scatter(x,y, s=20, c=color) # scatter plot\n",
816819
"ax.pcolormesh(xx,yy,zz, shading='gouraud') # fast colormesh function\n",
@@ -819,7 +822,8 @@
819822
"ax.contourf(xx,yy,zz, vmin=2, vmax=4) # filled contours plot\n",
820823
"n, bins, patch = ax.hist(x, 50) # histogram\n",
821824
"ax.imshow(matrix, origin='lower', extent=(x1, x2, y1, y2)) # show image\n",
822-
"ax.specgram(y, FS=0.1, noverlap=128, scale='linear') # plot a spectrogram"
825+
"ax.specgram(y, FS=0.1, noverlap=128, scale='linear') # plot a spectrogram\n",
826+
"```"
823827
]
824828
}
825829
],
@@ -840,9 +844,9 @@
840844
"name": "python",
841845
"nbconvert_exporter": "python",
842846
"pygments_lexer": "ipython3",
843-
"version": "3.5.2"
847+
"version": "3.6.2"
844848
}
845849
},
846850
"nbformat": 4,
847-
"nbformat_minor": 1
851+
"nbformat_minor": 2
848852
}

0 commit comments

Comments
 (0)