Skip to content

DOC: shrink bounding box on table plot #6841

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 2 commits into from

Conversation

TomAugspurger
Copy link
Contributor

Doc formatting issue brought up in #6661 (comment)

@jreback any way to view the doc build before merging into master? I was looking into pandas/ci/build_docs.sh but it looks likes I'd need to set up another travis job and a new GH pages site.

@jreback
Copy link
Contributor

jreback commented Apr 8, 2014

I think you can add echo cat /tmp/doc.log`` at the end of build_docs.sh and it will print the output of the doc build to the travis log (its a bash shell command so may not be 100% right).

The docs are always built for the 2.7 build (just not uploaded except for master). The log is not shown though.

@jreback
Copy link
Contributor

jreback commented Apr 8, 2014

@TomAugspurger I realize that the doc build log IS THEIR already, at the bottom of the travis output, just click right above print_skipped

@jreback
Copy link
Contributor

jreback commented Apr 8, 2014

@TomAugspurger did this work? to see the debug output?

@TomAugspurger
Copy link
Contributor Author

I guess the ipython_directive swallows up stdout except for Exceptions. I think I have a workaround. Testing locally first.

OK, this should work. I'm just going to raise an Exception where the message is the values from the debug statements.

@jreback
Copy link
Contributor

jreback commented Apr 9, 2014

@TomAugspurger good idea of raising to print the debug output!

did you figure out the size issue?

@TomAugspurger
Copy link
Contributor Author

Not entirely. I am able to reproduce it locally now though, so I think it may be a matplotlib 1.1.1 thing.
The strange part is that the figure looks fine when the code is just run. It's only when it gets run through the doc build that the table get's cut off. Something with the savefig decorator is changing something.

@jorisvandenbossche
Copy link
Member

@TomAugspurger And how does it look if you save it yourself with savefig?

@sinhrks
Copy link
Member

sinhrks commented Apr 10, 2014

Thanks for confirmation. I also could reproduce the issue using mpl1.1.1, and trying to dig in.

@jreback jreback added this to the 0.14.0 milestone Apr 10, 2014
@TomAugspurger
Copy link
Contributor Author

Here's where I'm at. These are running:

from pandas import *
from numpy.random import rand, randn

fig, ax = plt.subplots(1, 1)
df = DataFrame(rand(5, 3), columns=['a', 'b', 'c'])
ax.get_xaxis().set_visible(False)   # Hide Ticks
df.plot(table=True, ax=ax)

bad: matplotlib: 1.1.1
good: matplotlib 1.4.x

  1. good, interpreter:
    pandas-dev_interpretor
  2. good, doc build:
    pandas-dev_build
  3. bad interpreter:
    doc_interpretor
  4. bad doc build:
    doc_build

So it is being plotted correctly from the interpreter, it's just something in the doc build that changes what's saved. Presumably a matplotlib RCParam, but maybe something else. The confusing thing is why it affects MPL 1.1.1 differently than MPL 1.4.

Two solutions:

  1. Use MPL 1.4 (maybe 1.2 or 1.3) for the doc build
  2. figure out why MPL 1.1.1 is saved differently than MPL 1.4 and make the necessary adjustment in visualization.rst

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

1.3.1 is the current yes?

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

requirements-2.7_LOCALE.txt:matplotlib==1.3.0
requirements-2.7.txt:matplotlib==1.1.1
requirements-3.2.txt:matplotlib==1.2.1
requirements-3.3.txt:matplotlib==1.2.1

so If i switch 2.7.txt to 1.3.1, should I change anything else? (that's the do build), while the 2.7-locale actually does the slow tests

@TomAugspurger
Copy link
Contributor Author

yeah, 1.4 is the dev, 1.3.1 is the currently released version.

@TomAugspurger
Copy link
Contributor Author

I think changing requirements2.7.txt's matplotlib to 1.3.1 is all that's needed.

Once we have python 3.4 running, we'll have 2 builds using 1.3.1 then.

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

yep (I run 1.3.1 with 3.4 on windows as well)....ok...i'll push to master in a bit
(I have to build the wheel first), its all automated so pretty easy

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

ok....once this is finished let's see what things look like
https://travis-ci.org/pydata/pandas/builds/22712039

pls review all graphs....as we are now building with 1.3.1 (vs 1.1.1)

@jreback
Copy link
Contributor

jreback commented Apr 10, 2014

@TomAugspurger
Copy link
Contributor Author

Yep. Thanks. I'll close this one.

@TomAugspurger TomAugspurger deleted the table-doc-fix branch May 15, 2017 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants