python - Set line widths as a function of data in matplotlib -


I want to construct a hexine plot in matplotlib where the width of the line for each hexagon is an act of the number of observations That drop in hexagon I think it would be useful to add an additional level of conclusions to a hexine plot.

So far, I have the following code:

  import as nppy import matplotlib. PLT x = NP.RAM.Armim as the PPL (0,1 , 1000) y = N.P.Ram.Andyam (0,1,1000) z = N.P.Ramand.Eniform (0,1,1000) fig = PLT Figure () ax = fig.add_subplot (1,1,1) ax.hexbin (x, y, c = z, gridsize = 50, edgecolors = 'white')  

it creates Is a hexine plot where the color of bin is an act of the average z value for x, y in the bin

is there any way to determine the number of comments in each of the functions of the width of the hexes line width ?

Eventually I need a thick line for low population hexes. This should result in small visible hexes.

Just give linewidth as an array with the same length x, y .

  Import as MMP import matplotlib.pyplot as plt x = np.random.uniform (0,1,10) y = np.random uniform (0,1,10) Z = np.random.uniform (0,1,10) linewidths = np randem. Uniform (1, 6, 10) fig = plt.figure () ax = fig.add_subplot (1, 1,1) ax.hexbin (x, y, c = z, gridsize = 50, edgecolors = 'black', linewidths = Linewidths)  

Enter image details here

< P> I have blackened them to describe the effect. You will need to define the line width to apply in your mind.

I suggest that it is very easy to control the size of the marker while using a scatter plot. Therefore, unless you have the hexplot (I accept the ignorance of their importance I am using other), so it would be very easy


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -