Ich war an diesem matplotlib Streudiagramm Beispiel suchen: Matplotlib Marker Größe in Bokeh anpassen?
Ich habe versucht, das gleiche in Bokeh zu erreichen durch den Einsatz von matplotlib:
import numpy as np
import matplotlib.pyplot as plt
from bokeh.plotting import output_file, show
from bokeh import mpl
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radii
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
output_file("scatter_demo.html")
show(mpl.to_bokeh())
https://matplotlib.org/examples/shapes_and_collections/scatter_demo.html
"""
Simple demo of a scatter plot.
"""
import numpy as np
import matplotlib.pyplot as plt
N = 50
x = np.random.rand(N)
y = np.random.rand(N)
colors = np.random.rand(N)
area = np.pi * (15 * np.random.rand(N))**2 # 0 to 15 point radii
plt.scatter(x, y, s=area, c=colors, alpha=0.5)
plt.show()
Es diese Zahl erzeugt
Wie stelle ich die Radien der Kreise ein? Ich bin mir sicher, dass es mit reinem Bokeh erreicht werden kann, aber ich möchte mit Bokeh, das auf Matplotlib angewiesen ist, einen fortgeschritteneren Plan machen, also suche ich nach show(mpl.to_bokeh())
. Vielen Dank!
/Users/tc9/lib/python3.6/site-packages/bokeh/core/compat/bokeh_renderer.py:263: UserWarning: Path marker shapes currently not handled, defaulting to Circle
warnings.warn("Path marker shapes currently not handled, defaulting to Circle")
/Users/tc9/lib/python3.6/site-packages/matplotlib/artist.py:233: MatplotlibDeprecationWarning: get_axes has been deprecated in mpl 1.5, please use the
axes property. A removal date has not been set.
stacklevel=1)
EDIT
:Auch diese Warnung erhalte ich, wenn das Skript Bokeh läuft das Äquivalent Bokeh Demo Beispiel für ein Streudiagramm ist hier: http://bokeh.pydata.org/en/latest/docs/gallery/color_scatter.html
Ich werde vollständig auf Bokeh zurückgreifen und versuchen, ähnlich aussehende Grundstücke damit zu erreichen. Matplotlib kann sowieso nicht mit Millionen von Punkten umgehen. Ich muss dafür in Datashader schauen. Bokeh ist cool! Danke für die Entwicklung! Lernkurve nicht zu steil. –
Danke für die freundlichen Worte. Bitte schauen Sie auf der Mailingliste nach, wenn wir https://groups.google.com/a/continuum.io/forum/#!forum/bokeh immer helfen können – bigreddot