8000 check freetype version also specifies what is wrong by prhbrt · Pull Request #6403 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

check freetype version also specifies what is wrong #6403

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 10 commits into from
Prev Previous commit
Next Next commit
removed encode_as, since not really part of the PR.
  • Loading branch information
Herbert Kruitbosch committed Jul 19, 2016
commit 2400b3f009f37a362abcc0435311033d29ecb962
11 changes: 0 additions & 11 deletions lib/matplotlib/figure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1701,17 +1701,6 @@ def savefig(self, *args, **kwargs):
ax.patch.set_facecolor(cc[0])
ax.patch.set_edgecolor(cc[1])

def encode_as(self, **kwargs):
""" Equivalent of savefig, but does not store to a file, but returns a bytestring
using io.BytesIO. All kwargs are passed to savefig."""
assert 'format' in kwargs, "Make sure to specify the format"
assert 'fname' not in kwargs, "Do not provide a filename, this method returns a bytestring and does not write to a file"

in_memory_file = io.BytesIO()
self.savefig(in_memory_file, **kwargs)
in_memory_file.seek(0)
return in_memory_file.getvalue()

@docstring.dedent_interpd
def colorbar(self, mappable, cax=None, ax=None, use_gridspec=True, **kw):
"""
Expand Down
15 changes: 0 additions & 15 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,21 +690,6 @@ def savefig(*args, **kwargs):
return res


def encode_as(**kwargs):
""" Equivalent of savefig, but does not store to a file, but returns a
bytestring using io.BytesIO. All kwargs are passed to savefig."""
if 'format' not in kwargs:
raise ArgumentError("Make sure to specify the format")
if 'fname' in kwargs:
raise ArgumentError("Do not provide a filename, this function returns "
"a bytestring and does not write to a file")

in_memory_file = io.BytesIO()
savefig(in_memory_file, **kwargs)
in_memory_file.seek(0)
return in_memory_file.getvalue()


@docstring.copy_dedent(Figure.ginput)
def ginput(*args, **kwargs):
"""
Expand Down
0