Hackfut Security File Manager
Current Path:
/opt/alt/python27/lib64/python2.7/site-packages/matplotlib
opt
/
alt
/
python27
/
lib64
/
python2.7
/
site-packages
/
matplotlib
/
📁
..
📄
__init__.py
(28.29 KB)
📄
__init__.pyc
(28.75 KB)
📄
__init__.pyo
(28.69 KB)
📄
_cm.py
(361.73 KB)
📄
_cm.pyc
(100.64 KB)
📄
_cm.pyo
(100.64 KB)
📄
_cntr.so
(20.47 KB)
📄
_delaunay.so
(59.75 KB)
📄
_image.so
(276.23 KB)
📄
_mathtext_data.py
(56.63 KB)
📄
_mathtext_data.pyc
(62.3 KB)
📄
_mathtext_data.pyo
(62.3 KB)
📄
_path.so
(273.74 KB)
📄
_png.so
(152.84 KB)
📄
_pylab_helpers.py
(2.65 KB)
📄
_pylab_helpers.pyc
(3.75 KB)
📄
_pylab_helpers.pyo
(3.75 KB)
📄
afm.py
(14.74 KB)
📄
afm.pyc
(16.98 KB)
📄
afm.pyo
(16.98 KB)
📄
artist.py
(34.79 KB)
📄
artist.pyc
(40.46 KB)
📄
artist.pyo
(40.46 KB)
📄
axes.py
(273.52 KB)
📄
axes.pyc
(246.65 KB)
📄
axes.pyo
(245.56 KB)
📄
axis.py
(56.01 KB)
📄
axis.pyc
(59.43 KB)
📄
axis.pyo
(59.13 KB)
📄
backend_bases.py
(70.62 KB)
📄
backend_bases.pyc
(78.09 KB)
📄
backend_bases.pyo
(78.01 KB)
📁
backends
📄
bezier.py
(14.57 KB)
📄
bezier.pyc
(13.49 KB)
📄
bezier.pyo
(13.49 KB)
📄
blocking_input.py
(13.37 KB)
📄
blocking_input.pyc
(14.42 KB)
📄
blocking_input.pyo
(14.11 KB)
📄
cbook.py
(41.75 KB)
📄
cbook.pyc
(57.32 KB)
📄
cbook.pyo
(57.1 KB)
📄
cm.py
(7.91 KB)
📄
cm.pyc
(9.8 KB)
📄
cm.pyo
(9.8 KB)
📄
collections.py
(39.83 KB)
📄
collections.pyc
(44.05 KB)
📄
collections.pyo
(44.05 KB)
📄
colorbar.py
(26.81 KB)
📄
colorbar.pyc
(25.23 KB)
📄
colorbar.pyo
(25.23 KB)
📄
colors.py
(38.19 KB)
📄
colors.pyc
(39.74 KB)
📄
colors.pyo
(39.74 KB)
📄
contour.py
(41.89 KB)
📄
contour.pyc
(35.61 KB)
📄
contour.pyo
(35.45 KB)
📄
dates.py
(35.16 KB)
📄
dates.pyc
(40.17 KB)
📄
dates.pyo
(40.11 KB)
📁
delaunay
📄
dviread.py
(31.28 KB)
📄
dviread.pyc
(34.66 KB)
📄
dviread.pyo
(34.52 KB)
📄
figure.py
(40.3 KB)
📄
figure.pyc
(42.68 KB)
📄
figure.pyo
(42.55 KB)
📄
finance.py
(20.1 KB)
📄
finance.pyc
(18.24 KB)
📄
finance.pyo
(18.08 KB)
📄
font_manager.py
(41.65 KB)
📄
font_manager.pyc
(40.31 KB)
📄
font_manager.pyo
(40.31 KB)
📄
fontconfig_pattern.py
(6.28 KB)
📄
fontconfig_pattern.pyc
(6.55 KB)
📄
fontconfig_pattern.pyo
(6.55 KB)
📄
ft2font.so
(298.99 KB)
📄
hatch.py
(6.41 KB)
📄
hatch.pyc
(9.26 KB)
📄
hatch.pyo
(9.26 KB)
📄
image.py
(30.8 KB)
📄
image.pyc
(32.99 KB)
📄
image.pyo
(32.95 KB)
📄
legend.py
(31.54 KB)
📄
legend.pyc
(23.32 KB)
📄
legend.pyo
(23.15 KB)
📄
lines.py
(53.4 KB)
📄
lines.pyc
(56.63 KB)
📄
lines.pyo
(56.53 KB)
📄
mathtext.py
(99.62 KB)
📄
mathtext.pyc
(103.58 KB)
📄
mathtext.pyo
(103.21 KB)
📄
mlab.py
(92.08 KB)
📄
mlab.pyc
(99.53 KB)
📄
mlab.pyo
(99.35 KB)
📁
mpl-data
📄
mpl.py
(785 B)
📄
mpl.pyc
(1.16 KB)
📄
mpl.pyo
(1.16 KB)
📁
numerix
📄
nxutils.so
(9.48 KB)
📄
offsetbox.py
(29.11 KB)
📄
offsetbox.pyc
(34.01 KB)
📄
offsetbox.pyo
(33.96 KB)
📄
patches.py
(125.47 KB)
📄
patches.pyc
(130.6 KB)
📄
patches.pyo
(130.47 KB)
📄
path.py
(21.25 KB)
📄
path.pyc
(21 KB)
📄
path.pyo
(20.78 KB)
📁
projections
📄
pylab.py
(10.72 KB)
📄
pylab.pyc
(12.15 KB)
📄
pylab.pyo
(12.15 KB)
📄
pyparsing.py
(140.55 KB)
📄
pyparsing.pyc
(147.64 KB)
📄
pyparsing.pyo
(147.64 KB)
📄
pyplot.py
(80.54 KB)
📄
pyplot.pyc
(80.06 KB)
📄
pyplot.pyo
(80.06 KB)
📄
quiver.py
(36.66 KB)
📄
quiver.pyc
(33.35 KB)
📄
quiver.pyo
(33.35 KB)
📄
rcsetup.py
(22.88 KB)
📄
rcsetup.pyc
(21.02 KB)
📄
rcsetup.pyo
(20.85 KB)
📄
scale.py
(13.9 KB)
📄
scale.pyc
(19.78 KB)
📄
scale.pyo
(19.78 KB)
📁
sphinxext
📄
spines.py
(12.39 KB)
📄
spines.pyc
(11.6 KB)
📄
spines.pyo
(11.19 KB)
📄
table.py
(16.43 KB)
📄
table.pyc
(16.97 KB)
📄
table.pyo
(16.82 KB)
📄
texmanager.py
(21.94 KB)
📄
texmanager.pyc
(19.74 KB)
📄
texmanager.pyo
(19.74 KB)
📄
text.py
(58.42 KB)
📄
text.pyc
(59.27 KB)
📄
text.pyo
(59.27 KB)
📄
ticker.py
(39.48 KB)
📄
ticker.pyc
(50.94 KB)
📄
ticker.pyo
(50.81 KB)
📄
tight_bbox.py
(3.57 KB)
📄
tight_bbox.pyc
(4.06 KB)
📄
tight_bbox.pyo
(4.06 KB)
📄
transforms.py
(73.62 KB)
📄
transforms.pyc
(90.27 KB)
📄
transforms.pyo
(89.38 KB)
📄
ttconv.so
(63.95 KB)
📄
type1font.py
(11.27 KB)
📄
type1font.pyc
(11.22 KB)
📄
type1font.pyo
(11.22 KB)
📄
units.py
(4.86 KB)
📄
units.pyc
(5.78 KB)
📄
units.pyo
(5.78 KB)
📄
widgets.py
(39.88 KB)
📄
widgets.pyc
(42.59 KB)
📄
widgets.pyo
(42.4 KB)
📄
windowing.py
(454 B)
📄
windowing.pyc
(1.33 KB)
📄
windowing.pyo
(1.33 KB)
Editing: tight_bbox.py
""" This module is to support *bbox_inches* option in savefig command. """ import warnings from matplotlib.transforms import Bbox, TransformedBbox, Affine2D def adjust_bbox(fig, format, bbox_inches): """ Temporarily adjust the figure so that only the specified area (bbox_inches) is saved. It modifies fig.bbox, fig.bbox_inches, fig.transFigure._boxout, and fig.patch. While the figure size changes, the scale of the original figure is conserved. A function whitch restores the original values are returned. """ origBbox = fig.bbox origBboxInches = fig.bbox_inches _boxout = fig.transFigure._boxout asp_list = [] locator_list = [] for ax in fig.axes: pos = ax.get_position(original=False).frozen() locator_list.append(ax.get_axes_locator()) asp_list.append(ax.get_aspect()) def _l(a, r, pos=pos): return pos ax.set_axes_locator(_l) ax.set_aspect("auto") def restore_bbox(): for ax, asp, loc in zip(fig.axes, asp_list, locator_list): ax.set_aspect(asp) ax.set_axes_locator(loc) fig.bbox = origBbox fig.bbox_inches = origBboxInches fig.transFigure._boxout = _boxout fig.transFigure.invalidate() fig.patch.set_bounds(0, 0, 1, 1) if format in ["png", "raw", "rgba"]: adjust_bbox_png(fig, bbox_inches) return restore_bbox elif format in ["pdf", "eps", "svg", "svgz"]: adjust_bbox_pdf(fig, bbox_inches) return restore_bbox else: warnings.warn("bbox_inches option for %s backend is not implemented yet." % (format)) return None def adjust_bbox_png(fig, bbox_inches): """ adjust_bbox for png (Agg) format """ tr = fig.dpi_scale_trans _bbox = TransformedBbox(bbox_inches, tr) x0, y0 = _bbox.x0, _bbox.y0 fig.bbox_inches = Bbox.from_bounds(0, 0, bbox_inches.width, bbox_inches.height) x0, y0 = _bbox.x0, _bbox.y0 w1, h1 = fig.bbox.width, fig.bbox.height fig.transFigure._boxout = Bbox.from_bounds(-x0, -y0, w1, h1) fig.transFigure.invalidate() fig.bbox = TransformedBbox(fig.bbox_inches, tr) fig.patch.set_bounds(x0/w1, y0/h1, fig.bbox.width/w1, fig.bbox.height/h1) def adjust_bbox_pdf(fig, bbox_inches): """ adjust_bbox for pdf & eps format """ tr = Affine2D().scale(72) _bbox = TransformedBbox(bbox_inches, tr) fig.bbox_inches = Bbox.from_bounds(0, 0, bbox_inches.width, bbox_inches.height) x0, y0 = _bbox.x0, _bbox.y0 f = 72. / fig.dpi w1, h1 = fig.bbox.width*f, fig.bbox.height*f fig.transFigure._boxout = Bbox.from_bounds(-x0, -y0, w1, h1) fig.transFigure.invalidate() fig.bbox = TransformedBbox(fig.bbox_inches, tr) fig.patch.set_bounds(x0/w1, y0/h1, fig.bbox.width/w1, fig.bbox.height/h1) def process_figure_for_rasterizing(figure, bbox_inches_restore, mode): """ This need to be called when figure dpi changes during the drawing (e.g., rasterizing). It recovers the bbox and re-adjust it with the new dpi. """ bbox_inches, restore_bbox = bbox_inches_restore restore_bbox() r = adjust_bbox(figure, mode, bbox_inches) return bbox_inches, r
Upload File
Create Folder