Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed instances of {} formating for py2.6 compatibility. #5935

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

Merged
merged 1 commit into from
Jan 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions examples/pylab_examples/barchart_demo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def format_score(scr, test):
"""
md = testMeta[test]
if md:
return '{}\n{}'.format(scr, md)
return '{0}\n{1}'.format(scr, md)
else:
return scr

Expand Down Expand Up @@ -86,7 +86,7 @@ def plot_student_results(student, scores, cohort_size):
# Plot a solid vertical gridline to highlight the median position
ax1.axvline(50, color='grey', alpha=0.25)
# set X-axis tick marks at the deciles
cohort_label = ax1.text(.5, -.07, 'Cohort Size: {}'.format(cohort_size),
cohort_label = ax1.text(.5, -.07, 'Cohort Size: {0}'.format(cohort_size),
horizontalalignment='center', size='small',
transform=ax1.transAxes)

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/artist.py
Original file line number Diff line number Diff line change
Expand Up @@ -1482,5 +1482,5 @@ def kwdoc(a):

docstring.interpd.update(Artist=kwdoc(Artist))

_get_axes_msg = """{} has been deprecated in mpl 1.5, please use the
_get_axes_msg = """{0} has been deprecated in mpl 1.5, please use the
axes property. A removal date has not been set."""
2 changes: 1 addition & 1 deletion lib/matplotlib/lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,7 @@ def set_linestyle(self, ls):
ls = ls_mapper_r[ls]
except KeyError:
raise ValueError(("You passed in an invalid linestyle, "
"`{}`. See "
"`{0}`. See "
"docs of Line2D.set_linestyle for "
"valid values.").format(ls))

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/quiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ def _h_arrows(self, length):
# by a float first, as with 'mid'.
elif self.pivot != 'tail':
raise ValueError(("Quiver.pivot must have value in {{'middle', "
"'tip', 'tail'}} not {}").format(self.pivot))
"'tip', 'tail'}} not {0}").format(self.pivot))

tooshort = length < self.minlength
if tooshort.any():
Expand Down
6 changes: 3 additions & 3 deletions lib/mpl_toolkits/axes_grid1/axes_rgb.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ def imshow_rgb(self, r, g, b, **kwargs):
ny, nx = r.shape
if not ((nx, ny) == g.shape == b.shape):
raise ValueError('Input shapes do not match.'
'\nr.shape = {}'
'\ng.shape = {}'
'\nb.shape = {}'
'\nr.shape = {0}'
'\ng.shape = {1}'
'\nb.shape = {2}'
''.format(r.shape, g.shape, b.shape))

R = np.zeros([ny, nx, 3], dtype="d")
Expand Down