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

seaborn "countplot" not being drawn properly #51

Open
janssen opened this issue Apr 6, 2017 · 2 comments
Open

seaborn "countplot" not being drawn properly #51

janssen opened this issue Apr 6, 2017 · 2 comments

Comments

@janssen
Copy link
Contributor

janssen commented Apr 6, 2017

On the left, the plot drawn with FigureCanvasKivyAgg, on the right, the figure drawn with FigureCanvasKivy.

countplot

Here's the test program:

import sys, os

import matplotlib
matplotlib.use("module://kivy.garden.matplotlib.backend_kivyagg")
from kivy.garden.matplotlib import FigureCanvasKivy, FigureCanvasKivyAgg

from matplotlib import pyplot as plt

import pandas
import pandas.io.tests
import seaborn

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout

class TestApp(App):

    def build(self):

        box = BoxLayout(orientation="horizontal")

        df = seaborn.load_dataset("tips")

        seaborn.set_palette('colorblind')
        seaborn.set_style('darkgrid')
        seaborn.countplot(data=df,
                          x="day",
                          hue="time")
        print plt.gcf().axes

        box.add_widget(FigureCanvasKivyAgg(plt.gcf()))
        box.add_widget(FigureCanvasKivy(plt.gcf()))
        return box


if __name__ == "__main__":
    TestApp().run()
@janssen
Copy link
Contributor Author

janssen commented Apr 11, 2017

I'm now thinking this bug affects any plot drawn with rectangular regions like bars.

@wjanssen
Copy link

And Kivy seems to get confused about what text colors to use, as well. Though I don't see a pattern in that (yet).

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

No branches or pull requests

2 participants