<- previous    index    next ->

Lecture 2a, python plot examples

  First we cover the very powerful  python  matplotlib  package.
  This has been available for both  python2  and  python3
  and possibly not by default.
  pip install matplotlib   # command may have been needed

  The code for python code shown below can be obtained on linux.gl by:
  cp /afs/umbc.edu/users/s/q/squire/pub/download/lines.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/lines.py  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm1.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm1.py  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/donut.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/donut.py  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm3d1.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm3d1.py  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm3d2.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/plotm3d2.py  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/cosexp.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/pyplot_two_subplots.py3  .


  lines.py3 use matplotlib
  
  lines_py3.out printed output

  plotm1.py3 use matplotlib
  
  plotm1_py3.out printed output

  donut.py3 use matplotlib
  
  donut_py3.out printed output

  plotm3d1.py3 use matplotlib
  
  plotm3d1_py3.out printed output

  plotm3d2.py3 use matplotlib
  
  plotm3d2_py3.out printed output

  cosexp.py3 use matplotlib
  


  pylab_two_subplots.py3 use matplotlib
  

  
  Many more matplotlib examples are available at
  https://matplotlib.org/examples/index.html

  Next we cover the very useful  python  pylab  package.
  This has been available for both  python2  and  python3
  and possibly not by default.
  pip install pylab   # command may have been needed

  The code for python code shown below can be obtained on linux.gl by:
  cp /afs/umbc.edu/users/s/q/squire/pub/download/sin_plot_mat.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/test_rand.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/test_polyfit.py3  .
  cp /afs/umbc.edu/users/s/q/squire/pub/download/test_mypolyfit.py3  .

  sin_plot_mat.py3 use pylab
  

  test_rand.py3 use pylab
  
  
  test_rand_py3.out printed output

  test_polyfit.py3 use pylab
  
  
  test_polyfit_py3.out printed

  test_mypolyfit.py3 use pylab
  
  
  test_mypolyfit_py3.out printed

  More examples available by  search python pylab examples

  Now applications to plot Utah Graphics .dat files
  and 3D printer .stl files.

  light_dat.py3
  rect.dat
  

  light_dat.stl
  rect.stl
  
  
  
    <- previous    index    next ->

Other links

Many web sites on Java GUI, AWT, Swing, etc.
Many web sites on Python wx, tk, qt, etc.

Go to top