Skip to main content

Plot / Path / Point

Make a path plot with an additional layer of points.

from h2o_wave import site, data, ui
page = site['/demo']
page.add('example', ui.plot_card(    box='1 1 4 5',    title='Path + Point',    data=data('price performance', 10, rows=[        (0.1, 0.6),        (0.2, 0.5),        (0.3, 0.3),        (0.4, 0.2),        (0.4, 0.5),        (0.2, 0.2),        (0.8, 0.5),        (0.3, 0.3),        (0.2, 0.4),        (0.1, 0.0),    ]),    plot=ui.plot([        ui.mark(type='path', x='=price', y='=performance'),        ui.mark(type='point', x='=price', y='=performance'),    ])))
page.save()

Tags: โ€‚plot