There are many properties of a line that can be set, such as the color, dashes, and several others. There are essentially three ways of doing this. Let's take a simple line chart as an example:
>>> plt.plot([1,2,3,4], [1,4,9,16]) >>> plt.show()
After the preceding code is executed we'll get the following output:
We can use arguments within the plot function to set the property of the line:
>>> import numpy as np >>> import pandas as pd >>> import matplotlib.pyplot as plt >>> import pandas.tools.rplot as rplot >>> plt.plot([1, 2, 3, 4], [1, 4, 9, 16], linewidth=4.0) # increasing # the line width >>> plt.show()
After the preceding code is executed we'll get the following output: