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

Commitd8f1271

Browse files
authored
Merge branch 'master' into invertshared
2 parents1255aa5 +c8b6105 commitd8f1271

File tree

24 files changed

+287
-290
lines changed

24 files changed

+287
-290
lines changed

‎.appveyor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ install:
7777
# Let the install prefer the static builds of the libs
7878
-set LIBRARY_LIB=%CONDA_PREFIX%\Library\lib
7979
-mkdir lib || cmd /c "exit /b 0"
80-
-copy /y %LIBRARY_LIB%\zlibstatic.lib lib\z.lib
81-
-copy /y %LIBRARY_LIB%\libpng_static.lib lib\png.lib
80+
-copy /y %LIBRARY_LIB%\zlibstatic.lib lib\zlib.lib
81+
-copy /y %LIBRARY_LIB%\libpng16_static.lib lib\libpng16.lib
8282
# These z.lib / png.lib are not static versions but files which end up as
8383
# dependencies to the dll file. This is fine for the conda build, but not here
8484
# and for the wheels

‎.flake8

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ exclude =
2828

2929
per-file-ignores =
3030
setup.py: E402
31-
setupext.py: E501
3231

3332
tools/subset.py: E221, E251, E261, E302, E501
3433

@@ -176,7 +175,6 @@ per-file-ignores =
176175
examples/pyplots/text_commands.py: E231, E402
177176
examples/pyplots/text_layout.py: E231, E402
178177
examples/pyplots/whats_new_1_subplot3d.py: E402
179-
examples/pyplots/whats_new_98_4_fancy.py: E302, E402
180178
examples/pyplots/whats_new_98_4_fill_between.py: E225, E402
181179
examples/pyplots/whats_new_98_4_legend.py: E228, E402
182180
examples/pyplots/whats_new_99_axes_grid.py: E402
@@ -223,6 +221,7 @@ per-file-ignores =
223221
examples/text_labels_and_annotations/annotation_demo.py: E501
224222
examples/text_labels_and_annotations/demo_text_rotation_mode.py: E402
225223
examples/text_labels_and_annotations/custom_legends.py: E402
224+
examples/text_labels_and_annotations/fancyarrow_demo.py: E402
226225
examples/text_labels_and_annotations/font_family_rc_sgskip.py: E402
227226
examples/text_labels_and_annotations/font_file.py: E402
228227
examples/text_labels_and_annotations/legend.py: E402

‎build_alllocal.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ IF NOT DEFINED CONDA_PREFIX (
2020
:: copy the libs which have "wrong" names
2121
setLIBRARY_LIB=%CONDA_PREFIX%\Library\lib
2222
mkdir lib||cmd /c"exit /b 0"
23-
copy%LIBRARY_LIB%\zlibstatic.lib lib\z.lib
24-
copy%LIBRARY_LIB%\libpng_static.lib lib\png.lib
23+
copy%LIBRARY_LIB%\zlibstatic.lib lib\zlib.lib
24+
copy%LIBRARY_LIB%\libpng16_static.lib lib\libpng16.lib
2525

2626
:: build the target
2727
python setup.py%TARGET%
551 KB
Loading
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Changes to the Windows build
2+
````````````````````````````
3+
4+
Previously, when building the:mod:`matplotlib._png` extension, the build
5+
script would add "png" and "z" to the extensions ``.libraries`` attribute (if
6+
pkg-config information is not available, which is in particular the case on
7+
Windows).
8+
9+
In particular, this implies that the Windows build would look up files named
10+
``png.lib`` and ``z.lib``; but neither libpng upstream nor zlib upstream
11+
provides these files by default. (On Linux, this would look up ``libpng.so``
12+
and ``libz.so``, which are indeed standard names.)
13+
14+
Instead, on Windows, we now look up ``libpng16.lib`` and ``zlib.lib``, which
15+
*are* the upstream names for the shared libraries (as of libpng 1.6.x).
16+
17+
For a statically-linked build, the upstream names are ``libpng16_static.lib``
18+
and ``zlibstatic.lib``; one still needs to manually rename them if such a build
19+
is desired.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Deprecations
2+
````````````
3+
4+
``testing.jpl_units.UnitDbl.UnitDbl.checkUnits`` is deprecated.

‎doc/thirdpartypackages/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,14 @@ border, and logo.
235235

236236
..image::/_static/mpl_template_example.png
237237
:height:330px
238+
239+
numpngw
240+
=======
241+
242+
`numpngw<https://pypi.org/project/numpngw/>`_ provides functions for writing
243+
NumPy arrays to PNG and animated PNG files. It also includes the class
244+
``AnimatedPNGWriter`` that can be used to save a Matplotlib animation as an
245+
animated PNG file. See the example on the PyPI page or at the ``numpngw``
246+
`github repository<https://github.com/WarrenWeckesser/numpngw>`_.
247+
248+
..image::/_static/numpngw_animated_example.png

‎doc/users/prev_whats_new/whats_new_0.98.4.rst

Lines changed: 63 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ submitted patches
2323
.. _legend-refactor:
2424

2525
Legend enhancements
26-
--------------------
26+
-------------------
2727

2828
Jae-Joon has rewritten the legend class, and added support for
2929
multiple columns and rows, as well as fancy box drawing. See
@@ -40,7 +40,7 @@ multiple columns and rows, as well as fancy box drawing. See
4040
.. _fancy-annotations:
4141

4242
Fancy annotations and arrows
43-
-----------------------------
43+
----------------------------
4444

4545
Jae-Joon has added lots of support to annotations for drawing fancy
4646
boxes and connectors in annotations. See
@@ -49,18 +49,66 @@ boxes and connectors in annotations. See
4949
:class:`~matplotlib.patches.ArrowStyle`, and
5050
:class:`~matplotlib.patches.ConnectionStyle`.
5151

52-
..figure::../../gallery/pyplots/images/sphx_glr_whats_new_98_4_fancy_001.png
53-
:target:../../gallery/pyplots/whats_new_98_4_fancy.html
54-
:align:center
55-
:scale:50
52+
..plot::
5653

57-
Whats New 98 4 Fancy
54+
import matplotlib.patches as mpatch
55+
import matplotlib.pyplot as plt
5856

59-
.. _psd-amplitude:
57+
figheight = 4
58+
fig = plt.figure(figsize=(4.5, figheight), dpi=80)
59+
fontsize = 0.2 * fig.dpi
60+
61+
def make_boxstyles(ax):
62+
styles = mpatch.BoxStyle.get_styles()
63+
64+
for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
65+
ax.text(0.5, (float(len(styles)) - 0.5 - i)/len(styles), stylename,
66+
ha="center",
67+
size=fontsize,
68+
transform=ax.transAxes,
69+
bbox=dict(boxstyle=stylename, fc="w", ec="k"))
70+
71+
def make_arrowstyles(ax):
72+
styles = mpatch.ArrowStyle.get_styles()
73+
74+
ax.set_xlim(0, 4)
75+
ax.set_ylim(0, figheight*2)
76+
77+
for i, (stylename, styleclass) in enumerate(sorted(styles.items())):
78+
y = (float(len(styles)) - 0.25 - i) # /figheight
79+
p = mpatch.Circle((3.2, y), 0.2, fc="w")
80+
ax.add_patch(p)
81+
82+
ax.annotate(stylename, (3.2, y),
83+
(2., y),
84+
# xycoords="figure fraction", textcoords="figure fraction",
85+
ha="right", va="center",
86+
size=fontsize,
87+
arrowprops=dict(arrowstyle=stylename,
88+
patchB=p,
89+
shrinkA=5,
90+
shrinkB=5,
91+
fc="w", ec="k",
92+
connectionstyle="arc3,rad=-0.05",
93+
),
94+
bbox=dict(boxstyle="square", fc="w"))
95+
96+
ax.xaxis.set_visible(False)
97+
ax.yaxis.set_visible(False)
98+
99+
100+
ax1 = fig.add_subplot(121, frameon=False, xticks=[], yticks=[])
101+
make_boxstyles(ax1)
102+
103+
ax2 = fig.add_subplot(122, frameon=False, xticks=[], yticks=[])
104+
make_arrowstyles(ax2)
105+
106+
107+
plt.show()
60108

61109

62110
Native OS X backend
63-
--------------------
111+
-------------------
64112

65113
Michiel de Hoon has provided a native Mac OSX backend that is almost
66114
completely implemented in C. The backend can therefore use Quartz
@@ -74,8 +122,11 @@ matplotlibrc file, or run your script with::
74122

75123
> python myfile.py -dmacosx
76124

125+
126+
.. _psd-amplitude:
127+
77128
psd amplitude scaling
78-
-------------------------
129+
---------------------
79130

80131
Ryan May did a lot of work to rationalize the amplitude scaling of
81132
:func:`~matplotlib.pyplot.psd` and friends. See
@@ -86,7 +137,7 @@ compatibility and increase scaling options.
86137
.. _fill-between:
87138

88139
Fill between
89-
------------------
140+
------------
90141

91142
Added a:func:`~matplotlib.pyplot.fill_between` function to make it
92143
easier to do shaded region plots in the presence of masked data. You
@@ -102,7 +153,7 @@ where you want to do the filling.
102153
Whats New 98 4 Fill Between
103154

104155
Lots more
105-
-----------
156+
---------
106157

107158
Here are the 0.98.4 notes from the CHANGELOG::
108159

‎examples/pyplots/whats_new_98_4_fancy.py

Lines changed: 0 additions & 80 deletions
This file was deleted.

‎examples/shapes_and_collections/fancybox_demo.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,3 +210,5 @@ def test_all():
210210
matplotlib.patches.BoxStyle
211211
matplotlib.patches.BoxStyle.get_styles
212212
matplotlib.transforms.Bbox
213+
matplotlib.figure.Figure.text
214+
matplotlib.axes.Axes.text

‎examples/text_labels_and_annotations/fancyarrow_demo.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,19 @@ def to_texstring(s):
5252
ax.yaxis.set_visible(False)
5353

5454
plt.show()
55+
56+
#############################################################################
57+
#
58+
# ------------
59+
#
60+
# References
61+
# """"""""""
62+
#
63+
# The use of the following functions, methods, classes and modules is shown
64+
# in this example:
65+
66+
importmatplotlib
67+
matplotlib.patches
68+
matplotlib.patches.ArrowStyle
69+
matplotlib.patches.ArrowStyle.get_styles
70+
matplotlib.axes.Axes.annotate

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp