Send feedback
mp.tasks.vision.drawing_utils.plot_landmarks
Stay organized with collections
Save and categorize content based on your preferences.
Plot the landmarks and the connections in matplotlib 3d.
mp . tasks . vision . drawing_utils . plot_landmarks (
landmark_list : list [ landmark_module . NormalizedLandmark ],
connections : Optional [ list [ tuple [ int , int ]]] = None ,
landmark_drawing_spec : mp . tasks . vision . drawing_utils . DrawingSpec = DrawingSpec ( color = RED_COLOR , thickness = 5 ) ,
connection_drawing_spec : mp . tasks . vision . drawing_utils . DrawingSpec = DrawingSpec ( color = BLACK_COLOR , thickness = 5 ) ,
elevation : int = 10 ,
azimuth : int = 10
)
Args
landmark_list
A list of normalized landmarks to be plotted.
connections
A list of landmark index tuples that specifies how landmarks to
be connected.
landmark_drawing_spec
A DrawingSpec object that specifies the landmarks'
drawing settings such as color and line thickness.
connection_drawing_spec
A DrawingSpec object that specifies the
connections' drawing settings such as color and line thickness.
elevation
The elevation from which to view the plot.
azimuth
the azimuth angle to rotate the plot.
Raises
ValueError
If any connection contains an invalid landmark index.
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-11-05 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-05 UTC."],[],[]]