first try on wrapper classes (Object, Container (Column, Row)) that simplify the append/remove logic

This commit is contained in:
2021-06-02 15:02:14 +02:00
parent 487cc374ba
commit 67dfc77e46
7 changed files with 124 additions and 19 deletions
+5 -2
View File
@@ -3,8 +3,10 @@ import numpy as np
from bokeh.plotting import figure
from bokeh.models import ColumnDataSource
from buki import Object
class Plot2D:
class Plot2D(Object):
def __init__(self, *args, **kwargs):
data = {
@@ -13,8 +15,9 @@ class Plot2D:
self.source = source = ColumnDataSource(data=data)
self.fig = fig = figure()
fig = figure()
fig.image(source=source, x=0, y=0, dw=1, dh=1, palette="Spectral11")
super().__init__(fig)
def set(self, image):