Yi Qiu

Ph.D. student in Physics Department of Pennsylvania State University.

Scientific ploting guide

Genreal idea

  1. Ticks pointing inward.
  2. labels with different linestyle, colors, etc.
  3. large text size in labels, usually larger than the text surrounding.
  4. Use tight layout for the figure. e.g. plt.savefig('../test.pdf',bbox_inches='tight')
  5. Remember to add legend if you have multiple data in the same plot.


  1. Scientific plot package.
  2. One example by the developer of the package.
  3. Guide from Matplotlib.
  4. Others, 1.

Advanced techniques

  1. Zoom in for one plot. See reference here.

Jupyter Tips

Tooltip Pressing Shift-Tab will show a tooltip for the function or class your cursor is on:

Screen Shot 2023-10-31 at 1.53.57 PM

Another iPython feature - running shell commands inside a notebook:


You can use this to automatically install packages in the first cell of a notebook — make sure to use the -q flag to hide the output:


Jupyter Lab Keyboard Shortcuts Cheat Sheet

Below is a list of the most useful keyboard shortcuts in Jupyter Lab:

  • Cmd B = toggle sidebar
  • Alt W = close tab
  • Enter= to move from Command to Edit
  • Escape = to move from Edit to Command
  • Shift Enter = run cell

Command Mode

- a = insert cell above - b = insert cell below - d = delete cell - z = undo cell - shift z = redo cell - m = change cell to Markdown - y = change cell to code

Text mode

- Cmd Z = undo text - Shift Cmd Z = redo text