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

Graph blinks and duplicate on initializing #21

Open
mirajTariq opened this issue Oct 9, 2019 · 0 comments
Open

Graph blinks and duplicate on initializing #21

mirajTariq opened this issue Oct 9, 2019 · 0 comments

Comments

@mirajTariq
Copy link

BUG DESCRIPTION
I am working on simple kivy project to display graphs but as I initialized the graph with some data points and run the app, I get two graphs one originally configured graph and the second mini graph just below the original one and as I maximize the screen size, the mini graph start to blink

To Reproduce
Here is the code for simple graph application in kivy.
`
from kivy.app import App
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy_garden.graph import Graph, MeshLinePlot

class MyApp(App):

def build(self):
    root = FloatLayout()
    graph = Graph(
        xlabel='TIME',
        ylabel='POWER',
        # x_ticks_minor=5,
        # x_ticks_major=25,
        # y_ticks_major=1,
        y_grid_label=True,
        x_grid_label=True,
        padding=5,
        x_grid=True,
        y_grid=True,
        xmin=-0,
        xmax=19,
        ymin=0,
        ymax=11,
        size_hint=(0.8, 0.75),
        pos_hint={'x': 0, 'y': 0.15},
    )

    plot = MeshLinePlot(mode='line_strip', color=[0.9, 0.6, 0.3, 1])
    plot.points = [
        (0, 10),
        (1, 9.5),
        (2, 9.8),
        (3, 9.3),
        (4, 9.9),
        (5, 9.8),
        (6, 9.4),
        (7, 9.2),
        (8, 9.2),
        (9, 9.5),
        (10, 9.6),
        (11, 9.1),
        (12, 9.7),
        (13, 9.5),
        (14, 9.5),
        (15, 9.4),
        (16, 9.9),
        (17, 10),
        (18, 9.6),
    ]
    graph.add_plot(plot)
    root.add_widget(graph)
    return root

if name == 'main':
MyApp().run()`

Logs/output
Here are the logs for the code:
[INFO ] [Logger ] Record log in C:\Users\mtariq07\.kivy\logs\kivy_19-10-09_53.txt [INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.9 [INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12 [INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.1.22 [INFO ] [Kivy ] v1.11.1 [INFO ] [Kivy ] Installed at "C:\Users\mtariq07\Documents\myProjects\myVirtualEnv\lib\site-packages\kivy\__init__.py" [INFO ] [Python ] v3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 12:45:02) [MSC v.1900 32 bit (Intel)] [INFO ] [Python ] Interpreter at "C:\Users\mtariq07\Documents\myProjects\myVirtualEnv\Scripts\python.exe" [INFO ] [Factory ] 184 symbols loaded [INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored) [INFO ] [Text ] Provider: sdl2 [INFO ] [Window ] Provider: sdl2 [INFO ] [GL ] Using the "OpenGL" graphics system [INFO ] [GL ] GLEW initialization succeeded [INFO ] [GL ] Backend used <glew> [INFO ] [GL ] OpenGL version <b'4.6.0 - Build 26.20.100.6860'> [INFO ] [GL ] OpenGL vendor <b'Intel'> [INFO ] [GL ] OpenGL renderer <b'Intel(R) UHD Graphics 620'> [INFO ] [GL ] OpenGL parsed version: 4, 6 [INFO ] [GL ] Shading version <b'4.60 - Build 26.20.100.6860'> [INFO ] [GL ] Texture max size <16384> [INFO ] [GL ] Texture max units <32> [INFO ] [Window ] auto add sdl2 input provider [INFO ] [Window ] virtual keyboard not allowed, single mode, not docked [INFO ] [GL ] NPOT texture support is available [INFO ] [Base ] Start application main loop

Platform:

  • OS: Windows 10
  • Python version: 3.6.7
  • Kivy version: 1.11.1
  • Kivy garden graph version: 0.4.dev0
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