I want to plot the location of some disks generated randomly on a scatter plot, and see whether the disks are 'connected' to each other. For this, I need to set the radius of each disk fixed/linked to the axis scale.
The 's'
parameter in the plt.scatter
function uses points, so the size is not fixed relative to the axis. If I dynamically zoom into the plot, the scatter marker size remains constant on the plot and does not scale up with the axis.
How do I set the radius so they have a definite value (relative to the axis)?
相关问题
- How to plot a draggable polygon
- Tick label text and frequency in matplotlib plot
- Matplotlib: how to set ticks of twinned axis in lo
- Matplotlib differentiate between mean and median w
- matplotlib: color by dict without normalization
相关文章
- How to use a framework build of Python with Anacon
- Adding line markers when using LineCollection
- Updating a map marker in android
- How to add clipboard support to Matplotlib figures
- Adding a legend to a matplotlib boxplot with multi
- Matplotlib pyplot axes formatter
- matplotlib bwr-colormap, always centered on zero
- ImportError: No module named cycler
Instead of using
plt.scatter
, I suggest usingpatches.Circle
to draw the plot (similar to this answer). These patches remain fixed in size so that you can dynamically zoom in to check for 'connections':The plot this generates looks like this:
Using the zoom-option from the plot window, one can obtain such a plot:
This zoomed in version has kept the original circle size so the 'connection' can be seen.
If you want to change the circles to be transparent,
patches.Circle
takes analpha
as argument. Just make sure you insert it with the call toCircle
notadd_artist
: