It's been four months since the last matplotlib release, and there are
a lot of new features and bug-fixes.
Thanks to Charlie Moad for testing and preparing the source release,
including binaries for OS X and Windows for python 2.4 and 2.5 (2.6
and 3.0 will not be available until numpy is available on those
releases). Thanks to the many developers who contributed to this
release, with contributions from Jae-Joon Lee, Michael Droettboom,
Ryan May, Eric Firing, Manuel Metz, Jouni K. Seppänen, Jeff Whitaker,
Darren Dale, David Kaplan, Michiel de Hoon and many others who
submitted patches
Legend enhancements
Jae-Joon has rewritten the legend class, and added support for
multiple columns and rows, as well as fancy box drawing. See
legend() and
matplotlib.legend.Legend.
Michiel de Hoon has provided a native Mac OSX backend that is almost
completely implemented in C. The backend can therefore use Quartz
directly and, depending on the application, can be orders of magnitude
faster than the existing backends. In addition, no third-party
libraries are needed other than Python and NumPy. The backend is
interactive from the usual terminal application on Mac using regular
Python. It hasn't been tested with ipython yet, but in principle it
should to work there as well. Set 'backend : macosx' in your
matplotlibrc file, or run your script with:
>pythonmyfile.py-dmacosx
psd amplitude scaling
Ryan May did a lot of work to rationalize the amplitude scaling of
psd() and friends. See
Power spectral density (PSD).
The changes should increase MATLAB
compatibility and increase scaling options.
Fill between
Added a fill_between() function to make it
easier to do shaded region plots in the presence of masked data. You
can pass an x array and a ylower and yupper array to fill
between, and an optional where argument which is a logical mask
where you want to do the filling.
Addedmdehoon's native macosx backend from sf patch 2179017 - JDHRemovedtheprintsintheset_*stylecommands.Returnthelistofpretty-printedstringsinstead-JDHSomeofthechangesMichaelmadetoimprovetheoutputofthepropertytablesintherestdocsbrokeofmadedifficulttousesomeoftheinteractivedochelpers,e.g.,setpandgetp.Havingalltherestmarkupintheipythonshellalsoconfusedthedocstrings.Iaddedanewrcparamdocstring.harcopy,toformatthedocstringsdifferentlyforhardcopyandotheruse.TheArtistInspectorcouldusealittlerefactoringnowsincethereisduplicationofeffortbetweentherestoutputandthenon-restoutput-JDHUpdatedspectralmethods(psd,csd,etc.)toscaleone-sideddensitiesbyafactorof2and,optionally,scalealldensitiesbythesamplingfrequency.ThisgivesbetterMATLABcompatibility.-RMFixedalignmentofticksincolorbars.-MGDdropthedeprecated"new"keywordofnp.histogram()fornumpy1.2orlater.-JJLFixedabuginsvgbackendthatnew_figure_manager()ignoreskeywordsargumentssuchasfigsize,etc.-JJLFixedabugthatthehandlelengthofthenewlegendclasssettooshortwhennumpoints=1-JJLAddedsupportfordatawithunits(e.g.,dates)toAxes.fill_between.-RMAddedfancyboxkeywordtolegend.Alsoappliedsomechangesforbetterlook,includingbaselineadjustmentofthemultilinetextssothatitiscenteraligned.-JJLThetransmuterclassesinthepatches.pyarereorganizedassubclassesoftheStyleclasses.Afewmoreboxandarrowstylesareadded.-JJLFixedabuginthenewlegendclassthatdidn't allowed a tuple ofcoordinatevaluesasloc.-JJLImprovechecksforexternaldependencies,usingsubprocess(insteadofdeprecatedpopen*)anddistutils(forversionchecking)-DSDReimplementationofthelegendwhichsupportsbaselinealignment,multi-column,andexpandmode.-JJLFixedhistogramautoscalingbugwhenbinsorrangearegivenexplicitly(fixesDebianbug503148)-MMAddedrcParamaxes.unicode_minuswhichallowsplainhyphenforminuswhenFalse-JDHAddedscatterpointssupportinLegend.patchbyErikTollerud-JJLFixcrashinlogticking.-MGDAddedstatichelpermethodBrokenHBarCollection.span_whereandAxes/pyplotmethodfill_between.Seeexamples/pylab/fill_between.py-JDHAddx_isdataandy_isdataattributestoArtistinstances,andusethemtodeterminewhethereitherorbothcoordinatesareusedwhenupdatingdataLim.Thisisusedtofixautoscalingproblemsthathadbeentriggeredbyaxhline,axhspan,axvline,axvspan.-EFUpdatethepsd(),csd(),cohere(),andspecgram()methodsofAxesandthecsd()cohere(),andspecgram()functionsinmlabtobeinsyncwiththechangestopsd().Infact,underthehood,theseallcallthesamecoretodocomputations.-RMAdd'pad_to'and'sides'parameterstomlab.psd()toallowcontrollingofzeropaddingandreturningofnegativefrequencycomponents,respectively.TheseareaddedinawaythatdoesnotchangetheAPI.-RMFixhandlingofckwargbyscatter;generalizeis_string_liketoacceptnumpyandnumpy.mastringarrayscalars.-RMandEFFixapossibleEINTRproblemindviread,whichmighthelpwhensavingpdffilesfromtheqtbackend.-JKSFixbugwithzoomtorectangleandtwinaxes-MGDAddedJaeJoon's fancy arrow, box and annotation enhancements --seeexamples/pylab_examples/annotation_demo2.pyAutoscalingisnowsupportedwithsharedaxes-EFFixedexceptionindvireadthathappenedwithMinion-JKSset_xlim,ylimnowreturnacopyoftheviewlimarraytoavoidmodifyinplacesurprisesAddedimagethumbnailgeneratingfunctionmatplotlib.image.thumbnail.Seeexamples/misc/image_thumbnail.py-JDHAppliedscatlegpatchbasedonideasandworkbyErikTollerudandJae-JoonLee.-MMFixedbuginpdfbackend:ifyoupassafileobjectforoutputinsteadofafilename,e.g.,inawepapp,wenowflushtheobjectattheend.-JKSAddpathsimplificationsupporttopathswithgaps.-EFFixproblemwithAFMfilesthatdon't specify the font'sfullnameorfamilyname.-JKSAdded'scilimits'kwargtoAxes.ticklabel_format()method,foreasyaccesstotheset_powerlimitsmethodofthemajorScalarFormatter.-EFExperimentalnewkwargborderpadtoreplacepadinlegend,basedonsuggestionbyJae-JoonLee.-EFAllowspytoignorezerovaluesinsparsearrays,basedonpatchbyTonyYu.Alsofixedplottohandleemptydataarrays,andfixedhandlingofmarkersinfiglegend.-EFIntroducedrawstylesforlines.Transparentlysplitlinestyleslike'steps--'intodrawstyle'steps'andlinestyle'--'.Legendsalwaysusedrawstyle'default'.-MMFixedquiverandquiverkeybugs(failuretoscaleproperlywhenresizing)andaddedadditionalmethodsfordeterminingthearrowangles-EFFixpolarinterpolationtohandlenegativevaluesoftheta-MGDReorganizedcbookandmlabmethodsrelatedtonumericalcalculationsthathavelittletodowiththegoalsofthosetwomodulesintoaseparatemodulenumerical_methods.pyAlso,addedabilitytoselectpointsandstoppointselectionwithkeyboardinginputandmanualcontourlabelingcode.Finally,fixedcontourlabelingbug.-DMKFixbacktickinPostscriptoutput.-MGD[2089958]PathsimplificationforvectoroutputbackendsLeveragethesimplificationcodeexposedthroughpath_to_polygonstosimplifycertainwell-behavedpathsinthevectorbackends(PDF,PSandSVG)."path.simplify"mustbesettoTrueinmatplotlibrcforthistowork.-MGDAdd"filled"kwargtoPath.intersects_pathandPath.intersects_bbox.-MGDChangedfullarrowsslightlytoavoidanxpdfrenderingproblemreportedbyFriedrichHagedorn.-JKSFixconversionofquadratictocubicBeziercurvesinPDFandPSbackends.PatchbyJae-JoonLee.-JKSAdded5-pointstarmarkertoplotcommandq-EFFixhatchinginPSbackend-MGDFixlogwithbase2-MGDAddedsupportforbilinearinterpolationinNonUniformImage;patchbyGregoryLielens.-EFAddedsupportformultiplehistogramswithdataofdifferentlength-MMFixstepplotswithlogscale-MGDFixmaskedarrayswithmarkersinnon-Aggbackends-MGDFixclip_onkwargsoitactuallyworkscorrectly-MGDFixlocaleproblemsinSVGbackend-MGDfixquiversomaskedvaluesarenotplotted-JSWimproveinteractivepan/zoominqt4backendonwindows-DSDFixmorebugsinNaN/infhandling.Inparticular,pathsimplification(whichdoesnothandleNaNsorinfs)willbeturnedoffautomaticallywheninfsorNaNsarepresent.AlsomaskedarraysarenowconvertedtoarrayswithNaNsforconsistenthandlingofmasksandNaNs-MGDandEFAddedsupportforarbitraryrasterizationresolutionstotheSVGbackend.-MW