Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

matplotlib units of scatter size

star = MarkerStyle('*')
bbox = star.get_path().transformed(star.get_transform()).get_extents()
star_unit_width = bbox.width
star_unit_height = bbox.height
plt.scatter(0, -1, marker='s', s=(xscale*desired_data_width/star_unit_width)**2)
Source by discourse.matplotlib.org #
 
PREVIOUS NEXT
Tagged: #matplotlib #units #scatter #size
ADD COMMENT
Topic
Name
9+7 =