#!/usr/bin/env python # coding: utf-8 # In[1]: get_ipython().run_cell_magic('html', '', "\n\n\n
' + d3 + '
'))\n });\n})();\n") # In[6]: get_ipython().run_cell_magic('javascript', '', "\n(function(){\n var targetElement = get_element(element);\n require(['d3'], function(){\n $(targetElement).append($('' + d3.max([3,91,82,34,19]) + '
'))\n });\n})();\n") # In[7]: get_ipython().run_cell_magic('javascript', '', "\n(function(){\n var targetElement = get_element(element);\n require(['d3'], function(){\n var data = [1, 2, 3, 4, 5, 6, 10]\n var svg = d3.select(targetElement).append('svg')\n .attr('width', '350px')\n .attr('height', '100px')\n .style('border', '1px solid lightgray');\n \n svg.selectAll('circle')\n .data(data)\n .enter()\n .append('circle')\n .style('fill', 'skyblue')\n .attr('cx', function(d, i){ return i * (350/data.length) + 15})\n .attr('cy', '50px')\n .attr('r', function(d){ return d * 3})\n });\n})();\n") # In[ ]: