Free tools Windows power users keep installed
One-click scans. No signup required.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Call ax.plot() once for each series on the same Matplotlib Axes. Matplotlib assigns colors automatically from its style cycle; use color= when you need specific colors, and add a legend to identify the lines.
Plot multiple lines with automatic colors
This is the simplest pattern when Matplotlib’s current color cycle is suitable:
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.plot(x, y1, label="Series 1")
ax.plot(x, y2, label="Series 2")
ax.legend()
plt.show()
Each call adds a line to the same Axes. With no color specified, Matplotlib uses the next style in that Axes’ property cycle. If you plot more lines than the cycle contains, its styles repeat. See the Matplotlib plot API reference.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesSet a specific color for each line
Pass a color specification to each call when a particular series should always use a particular color:
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
fig, ax = plt.subplots()
ax.plot(x, y1, color="tab:blue", label="Series 1")
ax.plot(x, y2, color="#ff7f0e", label="Series 2")
ax.legend()
Matplotlib accepts short color codes such as "r", named colors such as "green", hex strings such as "#008000", Tableau colors such as "tab:blue", and cycle references such as "C0" and "C1". A plot format string can also combine a line or marker style with a color. Consult the plot API reference and color guide for supported specifications.
Use one palette across the lines in an Axes
Set an Axes-local property cycle before plotting to apply a chosen sequence of colors automatically:
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
from cycler import cycler
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
ax.set_prop_cycle(color=["#4c78a8", "#f58518", "#54a24b"])
ax.plot(x, y1, label="Series 1")
ax.plot(x, y2, label="Series 2")
ax.plot(x, y3, label="Series 3")
ax.legend()
The cycle is scoped to that Axes, making it useful when one chart needs a consistent palette without changing other charts. The styling guide explains property cycles.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Set the default cycle for subsequently created Axes
To configure a palette for Axes created later in the session, set axes.prop_cycle:
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
import matplotlib as mpl
from cycler import cycler
mpl.rcParams["axes.prop_cycle"] = cycler(
color=["#4c78a8", "#f58518", "#54a24b"]
)
Apply this before creating the Axes you want to affect. Changing this rcParam does not update Axes that already exist. The property-cycle guide and customization guide document the behavior. Do not use lines.color to set the usual colors for plot(); the rcParams reference says it has no effect on that function. Use axes.prop_cycle instead: Matplotlib rcParams reference.
Plot several datasets in one call
You can pass multiple [x], y, [fmt] groups to plot(), or pass 2D data so that each column is plotted as a dataset. Repeated calls are often easier to read when each line needs its own label or color. With one 2D argument, the one-dimensional sequence is reused for each dataset; when both x and y are 2D, they must have the same shape. Keyword arguments in a call with several datasets apply to all of them. See the API reference for the supported forms and shape details.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Make lines easier to distinguish
For overlapping lines or charts with many series, include a legend and consider adding markers or varying line styles as well as colors. Colors alone do not ensure that every reader can distinguish the series; Matplotlib’s styling options let you provide additional visual cues. Assign clear labels in the plotting calls so the legend identifies each line.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Check the documentation for your installed version
The stable Matplotlib API documentation identified here is for version 3.11.2, and its stable URL may change as releases advance. If your project pins an older Matplotlib version, verify the relevant call and color behavior in the documentation for that installed version.
Quick Recap
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

