diff --git a/README.md b/README.md index c294e64..a458003 100644 --- a/README.md +++ b/README.md @@ -2227,6 +2227,9 @@ Plot ```python # $ pip3 install matplotlib from matplotlib import pyplot +``` + +```python pyplot.plot() pyplot.plot(, ) pyplot.plot(..., label=) # Use `pyplot.legend()` to add legend. @@ -2610,6 +2613,9 @@ img.convert('RGB').save('test.png') ### ImageDraw ```python from PIL import ImageDraw +``` + +```python = ImageDraw.Draw() .point((x, y), fill=None) .line((x1, y1, x2, y2 [, ...]), fill=None, width=0, joint=None) diff --git a/index.html b/index.html index ed5fcc7..c979579 100644 --- a/index.html +++ b/index.html @@ -1925,14 +1925,15 @@ reader(adder(printer())) # 100, 101, ..., 109

#Plot

# $ pip3 install matplotlib
 from matplotlib import pyplot
-pyplot.plot(<y_data>)
+
+ +
pyplot.plot(<y_data>)
 pyplot.plot(<x_data>, <y_data>)
 pyplot.plot(..., label=<str>)    # Use `pyplot.legend()` to add legend.
 pyplot.savefig(<filename>)       # Saves figure.
 pyplot.show()                    # Displays figure.
 pyplot.clf()                     # Clears figure.
-
- +

#Table

Prints a CSV file as an ASCII table:

# $ pip3 install tabulate
 from tabulate import tabulate
 import csv
@@ -2220,15 +2221,16 @@ img.convert('RGB').save(ImageDraw
from PIL import ImageDraw
-<ImageDraw> = ImageDraw.Draw(<Image>)
+
+ +
<ImageDraw> = ImageDraw.Draw(<Image>)
 <ImageDraw>.point((x, y), fill=None)
 <ImageDraw>.line((x1, y1, x2, y2 [, ...]), fill=None, width=0, joint=None) 
 <ImageDraw>.arc((x1, y1, x2, y2), from_deg, to_deg, fill=None, width=0)
 <ImageDraw>.rectangle((x1, y1, x2, y2), fill=None, outline=None, width=0)
 <ImageDraw>.polygon((x1, y1, x2, y2 [, ...]), fill=None, outline=None)
 <ImageDraw>.ellipse((x1, y1, x2, y2), fill=None, outline=None, width=0)
-
- +
  • Use 'fill=<color>' to set the primary color.
  • Use 'outline=<color>' to set the secondary color.