%erp5_url http://10.0.87.104:2150/erp5/Base_executeJupyter %notebook_set_reference wendelin_test_ayush_001 %erp5_user zope %erp5_password insecure import numpy as np from matplotlib import pyplot as plt plt, np t = np.arange(0., 5., 0.2) t plt.clf() plt.ylabel('some numbers') context.Base_displayImage(image_object=plt) plt.plot(t, t, 'r--', t, t**5, 'bs', t, t**3, 'g^') context.Base_saveImage(plot=plt, reference='testplot1') context.Base_displayImage(image_object=plt) fig = plt.figure() ax = fig.add_subplot(1, 1, 1) N = 100 data = np.random.random((N, 7)) x = data[:,0] y = data[:,1] points = data[:,2:4] # color is the length of each vector in `points` color = np.sqrt((points**2).sum(axis = 1))/np.sqrt(2.0) rgb = plt.get_cmap('jet')(color) ax.scatter(x, y, color = rgb) context.Base_displayImage(image_object=plt) portal = context.getPortalObject() portal image_list = portal.portal_catalog(portal_type='Image', reference='louvre') image = image_list[0] print dir(image_list) %my_notebooks image_list.tuples() dir(image) print image.getURL() data_array = portal.data_array_module.newContent(portal_type = 'Data Array') data_array.initArray((3, 3), np.uint8) persistent_data_array = data_array.getArray() dir(persistent_data_array) import pandas as pd df = pd.DataFrame(persistent_data_array[:]) df df.plot(title='New Array') pdplot context.Base_displayImage(image_object=plt)