![]() Worked with a dozen programming languages (imperative, functional, mathematical (Mathematica, Maple, IDL), stack-based, constraint-based, flow-based, and assembly ). (x, y, sNone, cNone, markerNone, cmapNone, normNone, vminNone, vmaxNone, alphaNone, linewidthsNone,, edgecolorsNone, plotnonfiniteFalse, dataNone, kwargs) source. Good code design is a major priority for me. Have been loving science since 1980, and practicing it since 1998 (PhD in quantum physics). Have been teaching Python to graduate, doctoral and post-doctoral students, engineers and researchers since 2009. Former head of Data Science for a startup.įormer physicist (quantum mechanics, gravitational waves).Īuthor of the error propagation program "uncertainties", of the real time annotation program realtime_annotate and of the Markdown conversion program md_to_bgg. Former Chief Data Scientist of a large multinational. Board game enthusiast.įormer Science Advisor in an asset management firm. So avoid using mfc in conjuntion with fillstyleĢ) You might want to control the marker edge width (using markeredgewidth or mew) because if the marker is relatively small and the edge width is thick, the markers will look like filled even though they are not.įollowing is an example using errorbars: myplot.errorbar(x=myXval, y=myYval, yerr=myYerrVal, fmt='o', fillstyle='none', ecolor='blue', mec='blue')īasend on the example of Gary Kerr and as proposed here one may create empty circles related to specified values with following code: import matplotlib.pyplot as pltįrom matplotlib.markers import MarkerStyleĭirector, Head of Data Sourcing in an asset management firm. There are two important things to keep in mind when using fillstyle,ġ) If mfc is set to any kind of value it will take priority, hence, if you did set fillstyle to 'none' it would not take effect. In my case I have used it with errorbars but it works for markers in generalįillstyle accepts the following values: ![]() Which allows better control on the way markers are filled. In matplotlib 2.0 there is a parameter called fillstyle ![]() (The circles in the picture get squashed to ellipses because imshow aspect="auto" ). pylab_examples/ellipse_demo.pyĮ.set_facecolor( facecolor ) # "none" not None Here's another way: this adds a circle to the current axes, plot or image or whatever : from matplotlib.patches import Circle # $matplotlib/patches.pyĭef circle( xy, radius, color="lightsteelblue", facecolor="none", alpha=1, ax=None ): Would these work? plt.scatter(np.random.randn(100), np.random.randn(100), facecolors='none') Note: For other types of plots see this post on the use of markeredgecolor and markerfacecolor. Plt.scatter(x, y, s=80, facecolors='none', edgecolors='r') Try the following: import matplotlib.pyplot as plt The string ‘none’ to plot unfilled outlines The string ‘none’ to plot faces with no outlines From the documentation for scatter: Optional kwargs control the Collection properties in particular:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |