import numpy as np
import matplotlib.pylab as plt

fig = plt.figure(figsize=(8, 8))
ax = fig.add_subplot(111)

M = 1000
x = np.zeros(M + 1, dtype = np.float64)
y_up = np.zeros(M + 1, dtype = np.float64)
y_down = np.zeros(M + 1, dtype = np.float64)
## l1 norm
for i in range(len(x)):
    x[i] = -1 + 2.0 * i / M
    y_up[i] = 1.0 - np.abs(x[i])
    y_down[i] = -y_up[i]
ax.plot(np.append(x, np.fliplr([x])), np.append(y_up, np.fliplr([y_down])), label = "l1")    
## l2 norm
for i in range(len(x)):
    y_up[i] = (1.0 - x[i] ** 2) ** (0.5)
    y_down[i] = -y_up[i]
ax.plot(np.append(x, np.fliplr([x])), np.append(y_up, np.fliplr([y_down])), label = "l2")

## l10 norm
for i in range(len(x)):
    y_up[i] = (1.0 - x[i] ** 10) ** (0.1)
    y_down[i] = -y_up[i]
ax.plot(np.append(x, np.fliplr([x])), np.append(y_up, np.fliplr([y_down])), label = "l10")
## l infinity norm
ax.plot([-1, 1, 1, -1, -1], [-1, -1, 1, 1, -1], label = "linf")
## legend
ax.legend(loc = "upper right")
ax.set_ylim(-1.5, 1.5)
ax.set_xlim(-1.5, 1.5)

plt.show()
@@ -453,14 +453,15 @@
  %22l1
-%22)    
+-norm%22)
 %0A## 
@@ -645,16 +645,21 @@
 el = %22l2
+-norm
 %22)%0A%0A## l
@@ -845,16 +845,21 @@
 l = %22l10
+-norm
 %22)%0A## l 
@@ -933,16 +933,21 @@
  = %22linf
+-norm
 %22)%0A## le
@@ -958,33 +958,206 @@
 %0Aax.
-legend(loc = %22upper right
+set_title(%22Unit circles under different lp-norms%22, fontsize = %22large%22)%0Aax.legend(loc = %22upper right%22, fontsize = %22medium%22)%0Aax.set_xlabel(%22x%22, fontsize = %22large%22)%0Aax.set_ylabel(%22y%22, fontsize = %22large
 %22)%0Aa
@@ -1170,22 +1170,22 @@
 ylim(-1.
-5
+8
 , 1.
-5
+8
 )%0Aax.set
@@ -1197,16 +1197,40 @@
 (-1.
-5
+8
 , 1.
-5
+8
 )%0A
+fig.savefig(%22norms.pdf%22)
 %0Aplt

Add labels.