Tried with: Matplotlib 1.3.1 and Ubuntu 14. import matplotlib.pyplot as plt import random fig plt.figure (figsize (12, 12)) ax fig.addsubplot (projection'3d') sequencecontainingxvals list (range (0, 100)) sequencecontainingyvals list (range (0, 100)) sequence. import matplotlib.pyplot as plt import numpy as np Fixing random state for reproducibility np.ed(19680801) x np.random.rand(10. matplotlib has a mplot3d module that will do exactly what you want. See also the matplotlib.markers documentation for a list of all markers and Marker reference for more information on configuring markers. Mplot.scatter(x_vals, y_vals, s=2, marker=".", facecolors=c_arr, edgecolors="none", alpha=0.5) Example with different ways to specify markers. This can be set using the alpha input argument.Īn example that uses all the above customizations to draw the figure shown above: This situation can be improved by adding some transparency to the markers. If a dense set of data points is being drawn, multiple markers could obscure each other. For setting the RGB values of N points, pass a NumPy array of shape (N, 3) where each color value lies in (0, 1). In particular, it would be nice to be able to quickly see the names of the points that are. I would like to be able to see the name of an object when I hover my cursor over the point on the scatter plot associated with that object. Each point on the scatter plot is associated with a named object. It can be set by using the facecolors input argument. I am using matplotlib to make scatter plots. The color that is filled inside the marker is called the face color. If you do not want the edges to be drawn, then set the edgecolors input argument to none (a string, not the None value). The edge or border of the markers are drawn in black by default. It can be changed by setting the s input argument. The different markers of Matplotlib are shown here. This can changed to any of the other markers available in Matplotlib using the marker input argument.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |