<jupyter_start><jupyter_text>LinestyleYou can use the keyword argument `linestyle`, or shorter `ls`, to change the style of the plotted line:<jupyter_code># Example:
# Use a dotted line:

import matplotlib.pyplot as plt
import numpy as np

y_axis_points = np.array([2, 6, 0, 15])

plt.plot(y_axis_points, linestyle = 'dotted')
plt.show()
# using a dashed line
import matplotlib.pyplot as plt
import numpy as np

y_axis_points = np.array([2,7,3,5,9])

plt.plot(y_axis_points, linestyle = 'dashed')
plt.show()<jupyter_output><empty_output><jupyter_text>Shorter SyntaxThe line style can be written in a shorter syntax:`linestyle can be written as ls.``dotted can be written as :.``dashed can be written as --.`  Line ColorYou can use the keyword argument `color` or the shorter `c` to set the color of the lineExample:Set the line color to green:<jupyter_code>import matplotlib.pyplot as plt
import numpy as np

y_axis_points = np.array([2,7,3,5,9])

plt.plot(y_axis_points, color='g')
plt.show()<jupyter_output><empty_output><jupyter_text>Line WidthYou can use the keyword argument `linewidth` or the shorter `lw` to change the width of the line.The value is a floating number, in points:<jupyter_code># Example
# Plot with a 10.5pt wide line:

import matplotlib.pyplot as plt
import numpy as np

y_axis_points = np.array([2,7,3,5,9])

plt.plot(y_axis_points, linewidth=10.5)
plt.show()<jupyter_output><empty_output><jupyter_text>Multiple LinesYou can plot as many lines as you like by simply adding more `plt.plot()` functions:<jupyter_code>import matplotlib.pyplot as plt
import numpy as np

y1_axis_points = np.array([2,7,3,5,9])
y2_axis_points = np.array([3,1,5,8,15])

plt.plot(y1_axis_points, c='g')
plt.plot(y2_axis_points, c='r')

plt.show()<jupyter_output><empty_output><jupyter_text>You can also plot many lines by adding the points for the x- and y-axis for each line in the same `plt.plot()` function.    Example:    Draw two lines by specifiyng the x- and y-point values for both lines:<jupyter_code>import matplotlib.pyplot as plt
import numpy as np

x1_axis_points = np.array([1,2,3,4,5])
y1_axis_points = np.array([2,7,3,5,9])
x2_axis_points = np.array([1,2,3,4,5])
y2_axis_points = np.array([3,1,5,8,15])


plt.plot(x1_axis_points, y1_axis_points, x2_axis_points, y2_axis_points)
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11648822269807281, 'fraction_numerical': 0.029978586723768737, 'mean_word_length': 6.015015015015015, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '47203', 'license': 'MIT', 'n_tokens_mistral': 902, 'n_tokens_neox': 871, 'n_words': 250, 'path': 'Python Matplotlib/3) Matplotlib Line.ipynb', 'repo_name': 'Douglas254/Python-Machine-Learning-Data-Science-', 'size': '2335'}