data = pd.DataFrame({ 'a': list('CCCDDDEEE'), 'b': [2, 7, 4, 1, 2, 6, 8, 4, 7] }) spec = alt.Chart(data).mark_point().encode( x='a', y='b' ) chart = AltairChart(title='Scientific Proof') chart.set_data(spec)
class SciChart(AltairChart): title = 'Scientific Proofiness' def load(self): data = pd.DataFrame({ 'a': list('CCCDDDEEE'), 'b': [2, 7, 4, 1, 2, 6, 8, 4, 10] }) spec = alt.Chart(data).mark_point().encode( x='a', y='b' ) self.set_data(spec)