Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bug in Axes.relim when the first line is y_isdata=False and possible fix#854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
mdboom wants to merge1,135 commits intomatplotlib:v1.2.xfrommdboom:data_limits
Closed
Show file tree
Hide file tree
Changes from3 commits
Commits
Show all changes
1135 commits
Select commitHold shift + click to select a range
decbc33
Cleanup formatting of setup messages
mdboomApr 30, 2013
247689d
Fixes issue #1960. Account for right/top spine data offset on transfo…
cimarronmApr 30, 2013
50cbfd2
Bug if MPLCONFIGDIRS is set
mdboomMay 1, 2013
c154674
Improved comment for data spine transform adjustment - taken from mdb…
cimarronmMay 1, 2013
c985196
Switch agg backend to use pixfmt_rgba32_plain instead of pixfmt_rgba3…
WestacularMar 31, 2013
89479d3
Merge pull request #1868 from pelson/alpha_background
efiringMay 1, 2013
db81ab2
Fix position of rotated text in Agg backend
mdboomMay 2, 2013
3120e6c
Merge pull request #1968 from mdboom/rotated_text
mdboomMay 2, 2013
16d162b
figure: optionally configure automatic use of tight_layout
Aug 22, 2012
6f45b43
Added bullet to api_changes documentation on PR #1964
cimarronmMay 2, 2013
8eb05dc
add test for automatic use of tight layout
pwuertzMay 2, 2013
668690d
Merge pull request #1929 from pelson/bbox_inches_contour_problem
mdboomMay 3, 2013
f16a1d3
Fixes imsave so it does not flatten alpha-channel data (and updated t…
WestacularApr 27, 2013
ae5c2f1
Failing tests.
pelsonApr 12, 2013
1e7399f
Fixes bug where linestyle always appears solid if linewidth is large …
WestacularApr 24, 2013
1aefc52
Fixes bug where if alpha is set and edgecolor='none', edges would sti…
WestacularApr 24, 2013
6cc8aaa
Changes backends to support of independent face and edge alphas
WestacularApr 24, 2013
a7f7cc7
Add additional patch tests.
WestacularApr 27, 2013
2f10e68
Take Image object's alpha attribute into account when compositing mul…
WestacularApr 25, 2013
547cb7b
Fix Cairo backend so Images are actually visible for output formats o…
WestacularApr 26, 2013
04ee71e
Add a test case for compositing images with an alpha attribute
WestacularApr 27, 2013
b6b9062
Merge pull request #1956 from Westacular/imsave_alpha
pelsonMay 3, 2013
96ecc79
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 3, 2013
cd18645
Added documentation of patch/alpha changes.
WestacularMay 4, 2013
71e9ad9
Another documentation update
WestacularMay 4, 2013
25aba29
Replace usage of Lena image in the gallery.
tonysyuMay 5, 2013
42f3f00
Fix `backend_driver.py`
tonysyuMay 5, 2013
d75525f
Fix Travis config
mdboomMay 6, 2013
b9f2b72
Merge pull request #1977 from tonysyu/fix-backend_driver
mdboomMay 6, 2013
1d94744
Merge pull request #1976 from tonysyu/replace-lena-in-gallery
mdboomMay 6, 2013
84a7a1f
Allow local libpng copy
GBilloteyMay 2, 2013
620117f
Change message when libpng pkg-config lookup fails
mdboomMay 6, 2013
b009b63
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 6, 2013
2e31f66
Fix bug in SpanSelector, introduced in commit #dd325759
efiringMay 7, 2013
6131cf7
Merge pull request #1982 from efiring/SpanSelector_blit_bug
pelsonMay 7, 2013
d834f53
Fix #1984: Use float for result of rgb_to_hsv
mdboomMay 7, 2013
baeb6de
Updated test, and added a check for tuple length
WestacularMay 8, 2013
ba1f673
Documenting the isRGB -> isRGBA change to API
WestacularMay 8, 2013
4fd36da
Merge pull request #1984 from mdboom/rgb_to_hsv
pelsonMay 8, 2013
d63b854
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 8, 2013
1f42367
Go back to one ghostscript process per test
mdboomApr 26, 2013
6410dab
Fix some test images that weren't being run on Travis before
mdboomApr 26, 2013
9795b15
Run tests in parallel on Travis and in tox
mdboomApr 26, 2013
12bbda8
Include all test files
mdboomApr 26, 2013
ecf9ec3
Make the test function name match so that they can be pickled through…
mdboomApr 26, 2013
a127c31
Don't call "show" from a test
mdboomApr 26, 2013
852c127
Fix typo so correct gs executable will be run
mdboomApr 30, 2013
de64395
Remove import of old util
mdboomApr 30, 2013
2ba68a4
Don't run tests in parallel on Travis
mdboomApr 30, 2013
268c91c
Use $(nproc) to determine number of processors, as discovered by @pel…
mdboomMay 1, 2013
720fa80
Use cbook.mkdirs, since with multiprocessing tests each process may t…
mdboomMay 1, 2013
61fb780
Make the log quieter
mdboomMay 1, 2013
623a128
Only compare PNG version of hexbin extent -- it otherwise can crash i…
mdboomMay 6, 2013
3c94011
Don't switch backends in a test
mdboomMay 8, 2013
8c5071b
Make pip install of pyparsing quiet also
mdboomMay 8, 2013
3063af9
Limited number of processes on Travis to 8, since otherwise we run ou…
mdboomMay 8, 2013
807125d
Remove tests we're no longer using because they consume too much memo…
mdboomMay 8, 2013
08ba300
Fix .travis.yml message
mdboomMay 8, 2013
6917f4f
Histograms with stacked=True, normed=True now normalize sum of histog…
neggertMar 17, 2013
4db3df8
Add test images
neggertMar 17, 2013
f6efb57
Described stacked normed hist changes in CHANGELOG
neggertMar 18, 2013
4791c9a
PEP8 fixes
neggertApr 6, 2013
cda4f0d
Merge pull request #1833 from neggert/normedstacked_fix
mdboomMay 9, 2013
695e8b5
Added bar plot pickle support.
pelsonMay 9, 2013
5205ba3
Made it possible to pickle Log scale plots.
pelsonMay 9, 2013
87bd8b8
De-dented after the fix.
pelsonMay 9, 2013
fdb8280
Fixed tight_layout pickle support.
pelsonMay 9, 2013
5448d5b
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 10, 2013
440086d
Merge pull request #1990 from pelson/tight_layout_pickle
mdboomMay 10, 2013
f4d3a1b
Merge remote-tracking branch 'pelson/log_scale_pickle'
mdboomMay 10, 2013
1f07cb8
Merge pull request #1988 from pelson/pickle_bars
mdboomMay 10, 2013
a8aaf57
Use a plot directive rather than a link to a file in the _image direc…
mdboomMay 10, 2013
0e256f1
A number of small fixes to reduce warnings during doc build
mdboomMay 10, 2013
af07100
Merge pull request #1964 from cimarronm/data_spine_right_top_location…
mdboomMay 11, 2013
60e67e0
Merge pull request #1954 from Westacular/alpha-patch
efiringMay 11, 2013
9e734b6
Merge pull request #1902 from cimarronm/native_osx_quit
efiringMay 11, 2013
df34c93
Merge pull request #1896 from mdboom/doc-warnings
pelsonMay 13, 2013
301d6df
Merge pull request #1953 from mdboom/fix-doc-build
pelsonMay 13, 2013
e528dad
Raise exception when user tries to use set_xlim or set_ylim on a geo …
adrnMar 26, 2013
3ed1397
Merge pull request #1136 from pwuertz/tight-layout-parameters
pelsonMay 13, 2013
3e9f4a6
Merge pull request #1955 from Westacular/alpha-image-composite
pelsonMay 13, 2013
e13cd6e
Merge pull request #1927 from mdboom/pyparsing-workaround
mdboomMay 13, 2013
23c9734
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 13, 2013
fb2da34
Merge pull request #1917 from tacaswell/priv_axis.set_scale
mdboomMay 13, 2013
fdf123e
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 13, 2013
3b2a722
Merge pull request #1770 from dhyams/wxbackend_tiff_jpeg_pil_fix
mdboomMay 13, 2013
50508af
Fix problem writing out meshes
mdboomMay 13, 2013
5c26a7e
implement path_effects for Line2D objects
leejjoonJan 3, 2012
99e2b5e
modify patheffect_demo.py to demonstrate patheffects for Line2D objects
leejjoonMar 4, 2012
05bec2c
initial implementation of patheffect for collections
leejjoonJul 16, 2012
b7b3272
patheffect.draw_path_collection work with mixed renderer.
leejjoonApr 16, 2013
f157c97
add tests for patheffects
leejjoonApr 16, 2013
e1e0848
Add a sketch path filter.
mdboomOct 5, 2012
65544a1
Fix oops in _path.cpp
mdboomOct 5, 2012
c288df2
Add xkcd() function to set up a number of parameters to create plots …
mdboomMay 13, 2013
c7278d2
BUG: fixed weird case where boxplot whiskers went inside box
phobsonMar 26, 2013
c1a1079
Merge pull request #1950 from pelson/matplotlib_doc
pelsonMay 14, 2013
47193ee
Merge pull request #1092 from pelson/subplot_int
pelsonMay 14, 2013
edb1526
Credit basis for plots
mdboomMay 14, 2013
24cf375
Supported datetimes with microseconds, and those with long time serie…
pelsonApr 19, 2013
41b42a1
@NelleV's review actions.
pelsonApr 25, 2013
5736059
PEP8 the dates module.
pelsonMay 14, 2013
a736819
Added support for providing 1 or 2 extra colours to the contour routi…
pelsonMay 14, 2013
cc61700
Change behavior of `font.*` rcParams so they take effect only on to-b…
mdboomMay 14, 2013
9652004
Miscellaneous fixes mentioned in the PR
mdboomMay 14, 2013
a274a41
Provide xkcd as a context manager
mdboomMay 14, 2013
4a61f50
Add credit to figures themselves
mdboomMay 14, 2013
6b442b8
Merge pull request #1329 from mdboom/wiggles
pelsonMay 14, 2013
be049b2
Shared colorbar axes working.
pelsonJun 15, 2012
6f47a80
added unittest for colorbar creation.
pelsonJun 19, 2012
6dde4c1
Updated tests and added docstring.
pelsonAug 13, 2012
da88271
Rebased and updated tests.
pelsonMar 13, 2013
8952dee
@mdbooms suggestion for handling missing result files.
pelsonMay 14, 2013
d5b078b
Merge pull request #956 from pelson/multiaxes_colorbar
efiringMay 14, 2013
de956ef
Fix #2006: stretch is invalid, introduced in cc61700
mdboomMay 15, 2013
acbac82
Allow Paths to be marked as readonly, mark all of the singletons as r…
mdboomMay 15, 2013
4c9a407
Add docstrings
mdboomMay 15, 2013
3f032d9
Use with statement for assert_raises
mdboomMay 15, 2013
2ea3dcb
Fixes a number of bugs introduced by cc61700. texmanager will now st…
mdboomMay 15, 2013
ab5a141
Merge pull request #2006 from mdboom/fix-stretch-invalid
mdboomMay 15, 2013
d129186
Make weighting by position in the list less magical
mdboomMay 15, 2013
7293060
Long line
mdboomMay 15, 2013
97ba7b0
Don't use 'with assert_raises', it doesn't work on Python 2.6
mdboomMay 15, 2013
48ad92a
Fix #2015: After the baseline refactoring in #1810, baseline handling…
mdboomMay 15, 2013
83d9cf8
Merge pull request #2010 from mdboom/immutable-paths
mdboomMay 15, 2013
7e7b532
Merge remote-tracking branch 'upstream/v1.2.x' into HEAD
mdboomMay 15, 2013
28f33ed
Update baseline images
mdboomMay 15, 2013
b5c340a
Merge pull request #2012 from mdboom/texmanager-family-list
mdboomMay 15, 2013
4ed18ca
Merge pull request #2015 from mdboom/usetex-baseline-fixes
mdboomMay 16, 2013
84dffb2
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 16, 2013
0ecc702
qt4_editor formlayout now works with colour tuples
drevickoMay 16, 2013
7574ae7
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 16, 2013
8c8bc8f
Warn when too many figures are opened
mdboomMay 13, 2013
0433bd5
Rename rcParam to figure.max_open_warning. Rewrite warning message.
mdboomMay 15, 2013
3d17d95
Merge pull request #1919 from mdboom/max-num-figures
mdboomMay 16, 2013
f6ab77c
Build: avoid win32-incompatible functions
GBilloteyMay 16, 2013
5ba7a83
Fixed call to path.Path.contains_point from pnpoly. contains_point ac…
May 17, 2013
f311ef5
Merge pull request #2019 from GBillotey/SDK_build
mdboomMay 17, 2013
51107ea
Merge pull request #2020 from aseagram/fix_pnpoly
mdboomMay 17, 2013
d39f9c0
Merge pull request #1951 from mdboom/parallelize_tests
mdboomMay 17, 2013
d582cec
@efiring's suggestion.
pelsonMay 17, 2013
03f8ce1
Fixed failing axes test.
pelsonMay 17, 2013
f30dc0a
Merge pull request #1925 from pelson/long_timeseries_plots
efiringMay 20, 2013
cf819b6
Deprecate the top-level functions in path.py
mdboomMay 20, 2013
84ffb60
Remove deprecated code
mdboomMay 20, 2013
8364f87
Use new warn_deprecated helper function and decorator where appropriate.
mdboomMay 20, 2013
c933a62
Warn about incompleteness of CocoaAgg backend
mdboomMay 20, 2013
e955a74
Remove the Fltk backend
mdboomMay 20, 2013
4109e96
Remove the EMF backend
mdboomMay 20, 2013
56e7833
Add a what's new entry for the WebAgg backend
mdboomMay 20, 2013
016d120
Merge pull request #1753 from bingjeff/master
mdboomMay 20, 2013
f2cc66b
Type correction: float -> double
GBilloteyMay 20, 2013
cdf7d0a
Merge pull request #2029 from GBillotey/SDK_build
mdboomMay 20, 2013
0045a6b
pep8 fixes
tacaswellMay 20, 2013
486f58d
and fixed most of the long lines
tacaswellMay 20, 2013
89410ac
questionable fix of overly long import lines
tacaswellMay 20, 2013
965f6c4
Remove FltkAgg from comment
mdboomMay 20, 2013
21f3946
Fix typo
mdboomMay 20, 2013
3dab377
Remove commented out stuff
mdboomMay 20, 2013
85f1966
Remove misleading sentence.
mdboomMay 20, 2013
5438051
Clean up text and links in screenshots page of user docs.
tonysyuMay 21, 2013
84188bf
Tweak aesthetics of plots in screenshots page.
tonysyuMay 21, 2013
2c24467
Add streamplot function to screenshots doc
tonysyuMay 21, 2013
3e03751
fix pstoeps function in backend_ps.py
leejjoonMay 21, 2013
dac1530
Added an api_changes entry for contour levels & colours with the exte…
pelsonMay 21, 2013
0266d90
Handle setting path_effects in the constructor using the setp infrast…
mdboomMay 21, 2013
cfdf9ec
Fix some typos pointed out in #2026.
mdboomMay 21, 2013
92e51ad
Merge pull request #2030 from tacaswell/image_pep8
mdboomMay 21, 2013
cadcefc
Merge pull request #2032 from mdboom/fix-path-effect-construction
pelsonMay 21, 2013
3586394
Merge pull request #2026 from mdboom/deprecations-pre-13
pelsonMay 21, 2013
99d4e40
Merge pull request #2033 from leejjoon/fix-pstoeps
mdboomMay 21, 2013
5218f47
Added the cleared method to Path, and updated the path module's docum…
pelsonMay 15, 2013
855d343
Made the Path created by cleared consistent with the actions that hav…
pelsonMay 21, 2013
2150bd8
Fix missing ticks on inverted log axis
mdboomMay 21, 2013
24a635f
Merge pull request #2011 from pelson/api_changes_sketch
mdboomMay 21, 2013
355b056
Merge pull request #2002 from pelson/contour_levels_with_colors
mdboomMay 21, 2013
90c1aa3
Update a test to check inverted log axes
mdboomMay 21, 2013
4d2699e
Merge pull request #2028 from mdboom/additional-whats-new-1-3
mdboomMay 21, 2013
fd57377
Added a coding_standards test module. Currently checks PEP8 complianc…
pelsonApr 25, 2013
bc3e3ed
Added some of the PEP8 guidelines to ignore in the coding standards t…
pelsonMay 14, 2013
bb1a328
Fixed failing PEP8 test.
pelsonMay 14, 2013
747b849
PEP8 test only on python2. 2to3 produces non pep8 compliant code.
pelsonMay 21, 2013
bd4f6fd
Fixed tests after rebase.
pelsonMay 21, 2013
053968e
Added parameters to the xkcd function. Fixed deprecation warning on P…
pelsonMay 21, 2013
c4dc4cd
Merge remote-tracking branch 'tonysyu/screenshots-update' into doc-fi…
mdboomMay 21, 2013
b02b701
Merge pull request #2038 from pelson/xkcd_args
mdboomMay 21, 2013
40bbb9b
Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each exten…
bfroehleMay 21, 2013
40340fc
Fixes a number of problems in the doc build.
mdboomMay 21, 2013
bcf4df6
Merge pull request #2036 from mdboom/inverted-log-axis
mdboomMay 21, 2013
e7cb77e
Tweak image path
takluyverMay 22, 2013
c73f180
Merge pull request #2048 from takluyver/patch-1
pelsonMay 22, 2013
43ecd9a
Fix parallel testing by using the multi-process safe cbook.mkdirs
mdboomMay 22, 2013
22613d2
double backticks
mdboomMay 22, 2013
600e981
Merge pull request #2049 from mdboom/create-testing-cache-using-cbook…
pelsonMay 22, 2013
f9b1a9a
Remove long URL
mdboomMay 22, 2013
8ea183b
Merge pull request #2041 from mdboom/doc-fixes-1-3
mdboomMay 22, 2013
b239626
Merge pull request #2042 from bfroehle/py_array_unique_symbol
mdboomMay 22, 2013
b50237d
Deprecated the set_colorbar method on a scalar mappable.
pelsonMay 23, 2013
d5071f4
Merge pull request #1945 from pelson/pep8_testing
mdboomMay 23, 2013
785d66a
Added an api_changes note about the deprecation of ScalarMappable.set…
pelsonMay 24, 2013
936dd1f
pep8 fixes in animation.py
tacaswellMay 24, 2013
148ed82
Merge pull request #2055 from pelson/mappable_colorbar_attribute
mdboomMay 24, 2013
fd25c85
Add a better error message when IPython can't be found or doesn't hav…
mdboomMay 24, 2013
2cc7e21
Merge pull request #2057 from tacaswell/animation_pep8
pelsonMay 24, 2013
4a6b612
Merge pull request #2017 from drevicko/fix-form-colors
mdboomMay 24, 2013
22c3978
Merge pull request #2053 from mdboom/ipython-directive-error-message
pelsonMay 24, 2013
c39d9dc
fixed: compare_images for older numpy versions. added: backend_pdf al…
Aug 26, 2012
4aa8a58
fix: dpi setting should work now for rasterization in svg backend
Aug 26, 2012
ea5ac65
update for my patch
Oct 3, 2012
1fe4f41
update for my patch
Oct 3, 2012
c5d9b06
api change
May 4, 2013
fb704ec
added test result images
May 17, 2013
dfc1af8
added note to whats_new.rst
May 17, 2013
ea74001
added a note to changelog
May 17, 2013
f288b4e
Update test images
mdboomMay 21, 2013
f262892
Merge pull request #2044 from mdboom/svg-rasterize
mdboomMay 24, 2013
bf7b501
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 24, 2013
de2b77c
Merge remote-tracking branch 'upstream/v1.2.x'
mdboomMay 24, 2013
5e2e0fb
Merge pull request #2069 from jakevdp/anim_fix
mdboomMay 28, 2013
b093b8c
Merge branch 'pcolorargs'
mdboomMay 28, 2013
ca293ce
Merge pull request #1975 from pwuertz/pgf_mixedrenderer
pwuertzMay 27, 2013
130b6fc
Merge pull request #1813 from mdboom/gtk3-version-check
mdboomMay 28, 2013
e783faa
Merge branch 'v1.2.x' into v1.3.x
mdboomMay 28, 2013
7634812
Deprecate FIFOBuffer class
mdboomMay 28, 2013
5bb185e
use plt.subplots() in examples as much as possible
ivanovNov 8, 2012
8d1ee03
revert to OO interface (no pyplot) in OO example
ivanovNov 8, 2012
376a0b4
more `subplots`, cleanup of old `import *` style
ivanovNov 10, 2012
9a32267
whats_new: a note about the changed examples
ivanovNov 12, 2012
e4dbbc6
addressing PR feedback
ivanovDec 18, 2012
33b4cce
Merge branch 'use-subplots' into v1.3.x
mdboomMay 28, 2013
e5bd364
Fix pdf_use14corefonts test
mdboomMay 28, 2013
6588bb3
Fix tests
mdboomMay 28, 2013
3ac8144
Merge pull request #454 from mdboom/xdg_config
mdboomMay 28, 2013
ebb7a9d
Merge pull request #2050 from pelson/colormap_api
mdboomMay 28, 2013
2af443e
Fix PEP8 whitespace issue
mdboomMay 28, 2013
96ce689
Update logo_sidebar_horiz.png
mdboomMay 28, 2013
0d2f9a7
Merge remote-tracking branch 'upstream/v1.2.x' into v1.3.x
mdboomMay 29, 2013
493fa46
Merge pull request #2024 from mdboom/new_logo
mdboomMay 29, 2013
a92e00e
Merge pull request #2066 from GBillotey/oversized_doc_img
mdboomMay 29, 2013
e2bf78e
Merge pull request #2076 from cgohlke/patch-1
mdboomMay 29, 2013
b13fc46
Merge pull request #2077 from rblomberg/yahoo-csv-url-fix
mdboomMay 29, 2013
b3bdf84
Fix bug in XFG_CONFIG handling
mdboomMay 29, 2013
3b2f937
Fix deprecation warning when running tests
mdboomMay 29, 2013
b72b0f7
Fixed failing test on python3.
pelsonMay 29, 2013
e2d674c
Merge pull request #2080 from pelson/cmap_and_norm_levels_test_fix
mdboomMay 29, 2013
8eef95e
Exclude the setuptools stubs in the correct way
mdboomMay 29, 2013
33faad1
Wait until font caches exist before starting tests
mdboomMay 29, 2013
18d25f9
Correctly set the initial data limit bounding box to null limits rath…
mdboomMay 28, 2013
a129662
Only do the strange autoscale on/off thing when doing a histogram bar…
mdboomMay 29, 2013
412f1b3
Simplify handling of unit and null bboxes
mdboomMay 29, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletionsdoc/users/whats_new.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -148,6 +148,13 @@ default quality is 95; previously, the default quality was 75. This change
minimizes the artifacting inherent in JPEG images, particularly with images
that have sharp changes in color as plots often do.

Full control of the background color
------------------------------------
Wes Campaigne and Phil Elson fixed the Agg backend such that PNGs are now
saved with the correct background color when :meth:`fig.patch.get_alpha` is
not 1.


.. _whats-new-1-2-2:

new in matplotlib 1.2.2
Expand Down
9 changes: 5 additions & 4 deletionslib/matplotlib/backends/backend_agg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,9 +16,8 @@

TODO:

* allow save to file handle

* integrate screen dpi w/ ppi and text

"""
from __future__ import division
import threading
Expand DownExpand Up@@ -438,7 +437,7 @@ def draw(self):
"""
if __debug__: verbose.report('FigureCanvasAgg.draw', 'debug-annoying')

self.renderer = self.get_renderer()
self.renderer = self.get_renderer(cleared=True)
# acquire a lock on the shared font cache
RendererAgg.lock.acquire()

Expand All@@ -449,7 +448,7 @@ def draw(self):



def get_renderer(self):
def get_renderer(self, cleared=False):
l, b, w, h = self.figure.bbox.bounds
key = w, h, self.figure.dpi
try: self._lastKey, self.renderer
Expand All@@ -459,6 +458,8 @@ def get_renderer(self):
if need_new_renderer:
self.renderer = RendererAgg(w, h, self.figure.dpi)
self._lastKey = key
elif cleared:
self.renderer.clear()
return self.renderer

def tostring_rgb(self):
Expand Down
2 changes: 1 addition & 1 deletionlib/matplotlib/backends/backend_pdf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -436,7 +436,7 @@ def __init__(self, filename):

revision = ''
self.infoDict = {
'Creator': 'matplotlib %s, http://matplotlib.sf.net' % __version__,
'Creator': 'matplotlib %s, http://matplotlib.org' % __version__,
'Producer': 'matplotlib pdf backend%s' % revision,
'CreationDate': datetime.today()
}
Expand Down
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletionslib/matplotlib/tests/test_agg.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,50 @@
from __future__ import print_function

import os
import tempfile


from numpy.testing import assert_array_almost_equal


from matplotlib.image import imread
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib.testing.decorators import cleanup


@cleanup
def test_repeated_save_with_alpha():
# We want an image which has a background color of bluish green, with an
# alpha of 0.25.

fig = Figure([1, 0.4])
canvas = FigureCanvas(fig)
fig.set_facecolor((0, 1, 0.4))
fig.patch.set_alpha(0.25)

# The target color is fig.patch.get_facecolor()

_, img_fname = tempfile.mkstemp(suffix='.png')
try:
fig.savefig(img_fname,
facecolor=fig.get_facecolor(),
edgecolor='none')

# Save the figure again to check that the
# colors don't bleed from the previous renderer.
fig.savefig(img_fname,
facecolor=fig.get_facecolor(),
edgecolor='none')

# Check the first pixel has the desired color & alpha
# (approx: 0, 1.0, 0.4, 0.25)
assert_array_almost_equal(tuple(imread(img_fname)[0, 0]),
(0.0, 1.0, 0.4, 0.250),
decimal=3)
finally:
os.remove(img_fname)


def report_memory(i):
pid = os.getpid()
Expand DownExpand Up@@ -64,3 +108,8 @@ def report_memory(i):
## # w/o text and w/o write_png: Average memory consumed per loop: 0.02
## # w/o text and w/ write_png : Average memory consumed per loop: 0.3400
## # w/ text and w/ write_png : Average memory consumed per loop: 0.32


if __name__ == "__main__":
import nose
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)
19 changes: 19 additions & 0 deletionslib/matplotlib/tests/test_figure.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -74,6 +74,25 @@ def test_suptitle():
fig.suptitle('title', color='g', rotation='30')


@image_comparison(baseline_images=['alpha_background'],
# only test png and svg. The PDF output appears correct,
# but Ghostscript does not preserve the background color.
extensions=['png', 'svg'],
savefig_kwarg={'facecolor': (0, 1, 0.4), 'edgecolor': 'none'})
def test_alpha():
# We want an image which has a background color and an
# alpha of 0.4.
fig = plt.figure(figsize=[2, 1])
fig.set_facecolor((0, 1, 0.4))
fig.patch.set_alpha(0.4)

import matplotlib.patches as mpatches
fig.patches.append(mpatches.CirclePolygon([20, 20],
radius=15,
alpha=0.6,
facecolor='red'))


if __name__ == "__main__":
import nose
nose.runmodule(argv=['-s', '--with-doctest'], exit=False)
6 changes: 3 additions & 3 deletionssrc/_backend_agg.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -411,7 +411,7 @@ RendererAgg::RendererAgg(unsigned int width, unsigned int height, double dpi,
renderingBuffer.attach(pixBuffer, width, height, stride);
pixFmt.attach(renderingBuffer);
rendererBase.attach(pixFmt);
rendererBase.clear(agg::rgba(1, 1, 1, 0));
rendererBase.clear(agg::rgba(0, 0, 0, 0));
rendererAA.attach(rendererBase);
rendererBin.attach(rendererBase);
hatchRenderingBuffer.attach(hatchBuffer, HATCH_SIZE, HATCH_SIZE,
Expand DownExpand Up@@ -1108,7 +1108,7 @@ RendererAgg::draw_image(const Py::Tuple& args)
inv_mtx.invert();

typedef agg::span_allocator<agg::rgba8> color_span_alloc_type;
typedef agg::image_accessor_clip<agg::pixfmt_rgba32>
typedef agg::image_accessor_clip<agg::pixfmt_rgba32_plain>
image_accessor_type;
typedef agg::span_interpolator_linear<> interpolator_type;
typedef agg::span_image_filter_rgba_nn<image_accessor_type,
Expand DownExpand Up@@ -2388,7 +2388,7 @@ RendererAgg::clear(const Py::Tuple& args)
_VERBOSE("RendererAgg::clear");

args.verify_length(0);
rendererBase.clear(agg::rgba(1, 1, 1, 0));
rendererBase.clear(agg::rgba(0, 0, 0, 0));

return Py::Object();
}
Expand Down
2 changes: 1 addition & 1 deletionsrc/_backend_agg.h
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -53,7 +53,7 @@

const size_t NUM_VERTICES[] = { 1, 1, 1, 2, 3, 1 };

typedef agg::pixfmt_rgba32 pixfmt;
typedef agg::pixfmt_rgba32_plain pixfmt;
typedef agg::renderer_base<pixfmt> renderer_base;
typedef agg::renderer_scanline_aa_solid<renderer_base> renderer_aa;
typedef agg::renderer_scanline_bin_solid<renderer_base> renderer_bin;
Expand Down
2 changes: 1 addition & 1 deletionsrc/_image.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -33,7 +33,7 @@
#include "mplutils.h"


typedef agg::pixfmt_rgba32 pixfmt;
typedef agg::pixfmt_rgba32_plain pixfmt;
typedef agg::pixfmt_rgba32_pre pixfmt_pre;
typedef agg::renderer_base<pixfmt> renderer_base;
typedef agg::span_interpolator_linear<> interpolator_type;
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp