plots.js 279 B

1234567891011
  1. 'use strict';
  2. goog.provide('Blockly.Python.plots');
  3. goog.require('Blockly.Python');
  4. Blockly.Python['plot_legend'] = function(block) {
  5. Blockly.Python.definitions_['import_matplotlib'] = 'import matplotlib.pyplot as plt';
  6. var code = 'plt.legend()\n';
  7. return code;
  8. };