How to post Python source code on WordPress

I’m back to posting now that I am on sabbatical; things have evolved on WordPress in the last year, and now it’s easy to post source code. See the following link so that you can see read about how easy it is to include code in WordPress.

Of course, if you are editing a post on WordPress, you should see the little “code” textual icon in the editing toolbar; just click it and you can insert exciting code:

import numpy as np
import matplotlib.pyplot as plt

t = linspace(0,10,200)
plot( t, sin(t) )

About PaulNakroshis

Professor of Physics at the University of Southern Maine.
This entry was posted in Interesting Links, Matplotlib, Plotting and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.