Skip to content
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

[sprint] forward keyword args though table #2167

Merged
merged 3 commits into from
Jun 30, 2013

Conversation

mrterry
Copy link
Contributor

@mrterry mrterry commented Jun 28, 2013

pyplot.table() forwards kwargs though to Table()

closes #2143

from matplotlib.testing.decorators import image_comparison


@image_comparison(baseline_images=['table_zorder'], extensions=['png'])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. Any chance you could remove_text=True this to reduce the chance of it failing with different freetype versions? I'm also interested to know if your change means you can add color to the table - might be nice to update the test to include that (rather than creating a new test for that facet).

Nice work!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean add remove_text=True to @image_comparision? (added to PR).

You can use celColours keyword on axes.table() to set the cell (ie
Rectangle.facecolor) color. You can also specify color arguments to the
Table.add_cell() function. Is that sufficient or are you looking for
something else?

-matt

On Sat, Jun 29, 2013 at 2:35 PM, Phil Elson notifications@github.comwrote:

In lib/matplotlib/tests/test_table.py:

@@ -0,0 +1,37 @@
+import matplotlib.pyplot as plt
+import numpy as np
+from matplotlib.testing.decorators import image_comparison
+
+
+@image_comparison(baseline_images=['table_zorder'], extensions=['png'])

Looks great to me. Any chance you could remove_text=True this to reduce
the chance of it failing with different freetype versions? I'm also
interested to know if your change means you can add color to the table -
might be nice to update the test to include that (rather than creating a
new test for that facet).

Nice work!


Reply to this email directly or view it on GitHubhttps://github.com//pull/2167/files#r4952800
.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

British spelling of color alert!
On Jun 29, 2013 3:27 PM, "Matt Terry" notifications@github.com wrote:

In lib/matplotlib/tests/test_table.py:

@@ -0,0 +1,37 @@
+import matplotlib.pyplot as plt
+import numpy as np
+from matplotlib.testing.decorators import image_comparison
+
+
+@image_comparison(baseline_images=['table_zorder'], extensions=['png'])

Do you mean add remove_text=True to @image_comparision? (added to PR). You
can use celColours keyword on axes.table() to set the cell (ie
Rectangle.facecolor) color. You can also specify color arguments to the
Table.add_cell() function. Is that sufficient or are you looking for
something else?
… <#13f919ed4d5ac63c_>
-matt
On Sat, Jun 29, 2013 at 2:35 PM, Phil Elson notifications@github.comwrote:
In lib/matplotlib/tests/test_table.py: > @@ -0,0 +1,37 @@ > +import
matplotlib.pyplot as plt > +import numpy as np > +from
matplotlib.testing.decorators import image_comparison > + > + >
+@image_comparison(baseline_images=['table_zorder'], extensions=['png'])
Looks great to me. Any chance you could remove_text=True this to reduce the
chance of it failing with different freetype versions? I'm also interested
to know if your change means you can add color to the table - might be nice
to update the test to include that (rather than creating a new test for
that facet). Nice work! — Reply to this email directly or view it on GitHub<
https://github.com/matplotlib/matplotlib/pull/2167/files#r4952800> .


Reply to this email directly or view it on GitHubhttps://github.com//pull/2167/files#r4952860
.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that something that should be exorcized?
On Jun 29, 2013 4:05 PM, "Benjamin Root" notifications@github.com wrote:

In lib/matplotlib/tests/test_table.py:

@@ -0,0 +1,37 @@
+import matplotlib.pyplot as plt
+import numpy as np
+from matplotlib.testing.decorators import image_comparison
+
+
+@image_comparison(baseline_images=['table_zorder'], extensions=['png'])

British spelling of color alert!
… <#13f91c117ea986fd_>
On Jun 29, 2013 3:27 PM, "Matt Terry" notifications@github.com wrote: >
In lib/matplotlib/tests/test_table.py: > > > @@ -0,0 +1,37 @@ > > +import
matplotlib.pyplot as plt > > +import numpy as np > > +from
matplotlib.testing.decorators import image_comparison > > + > > + > >
+@image_comparison(baseline_images=['table_zorder'], extensions=['png']) >

Do you mean add remove_text=True to @image_comparision? (added to PR).
You > can use celColours keyword on axes.table() to set the cell (ie >
Rectangle.facecolor) color. You can also specify color arguments to the >
Table.add_cell() function. Is that sufficient or are you looking for >
something else? > … <#13f919ed4d5ac63c_> > -matt > On Sat, Jun 29, 2013 at
2:35 PM, Phil Elson notifications@github.comwrote: In
lib/matplotlib/tests/test_table.py: > @@ -0,0 +1,37 @@ > +import
matplotlib.pyplot as plt > +import numpy as np > +from
matplotlib.testing.decorators import image_comparison > + > + >
+@image_comparison(baseline_images=['table_zorder'], extensions=['png'])
Looks great to me. Any chance you could remove_text=True this to reduce the
chance of it failing with different freetype versions? I'm also interested
to know if your change means you can add color to the table - might be nice
to update the test to include that (rather than creating a new test for
that facet). Nice work! — Reply to this email directly or view it on
GitHub< https://github.com/matplotlib/matplotlib/pull/2167/files#r4952800>
. — Reply to this email directly or view it on GitHub<
https://github.com/matplotlib/matplotlib/pull/2167/files#r4952860> .


Reply to this email directly or view it on GitHubhttps://github.com//pull/2167/files#r4952906
.

dmcdougall added a commit that referenced this pull request Jun 30, 2013
[sprint] forward keyword args though table
@dmcdougall dmcdougall merged commit 1c31b47 into matplotlib:master Jun 30, 2013
@mdboom
Copy link
Member

mdboom commented Jul 2, 2013

Cherry-picked to 1.3.x in a4289db

dmcdougall added a commit that referenced this pull request Jul 2, 2013
[sprint] forward keyword args though table
@dmcdougall
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

zorder keyword in axes.table
5 participants