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

text color not set properly; line width ignored #52

Open
janssen opened this issue Apr 11, 2017 · 1 comment
Open

text color not set properly; line width ignored #52

janssen opened this issue Apr 11, 2017 · 1 comment

Comments

@janssen
Copy link
Contributor

janssen commented Apr 11, 2017

Another problem. On the left is the backend_kivyagg figure, on the right the backend_kivy figure:

screenshot from 2017-04-11 09-45-03

Just eyeballing this, you can see that the text colors for the tick labels (xtick.color and ytick.color) aren't as specified (white), and that the lines drawn for the regressions are not thick enough.

The fonts on the right are also smaller, but this is a general Kivy bug; it does not scale the fonts properly when using the SDL2 backend.

@janssen
Copy link
Contributor Author

janssen commented Apr 11, 2017

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_style("darkgrid", {'xtick.color': 'w', 'ytick.color': 'w', 'text.color': 'w', 'axes.labelcolor': 'w', 'axes.labelcolor': 'w', 'figure.facecolor': 'black'})
        seaborn.jointplot(data=df, kind="reg",
                          x="total_bill", y="tip")
        print plt.gcf().axes

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


if __name__ == "__main__":
    TestApp().run()

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

1 participant