[
    {
        "text": "",
        "created": "20150608021950383",
        "data": "{{0.654223,1.26855},{1.312,-0.748561},{0.793451,1.64016},{-1.39176,1.58786},{0.0643577,-1.89805},{1.63529,-0.495863},{0.44774,-2.6131},{-1.88323,1.94351},{-0.397441,0.626869},{-0.376089,-0.559559}}",
        "modified": "20150608024634583",
        "tags": "",
        "title": "Data Set 1"
    },
    {
        "text": "",
        "created": "20150608022444246",
        "data": "{{2.03411,-0.0451884},{-0.746351,-0.72882},{0.514443,2.47398},{0.203145,-0.0362408},{-1.91553,-3.67489},{1.17636,-0.60762},{0.118217,-4.06982},{-1.18479,0.520772},{0.629547,1.27857},{-1.58445,-1.20125},{-0.746318,-2.87449},{-0.332163,-0.0358025},{-1.29429,1.57693},{-1.76081,1.73507},{0.476511,-1.64757}}",
        "modified": "20150608024505102",
        "tags": "",
        "title": "Data Set 2"
    },
    {
        "text": ".data_plot text {\n    cursor: default;\n    pointer-events: none;\n}\n\n.data_point circle {\n    stroke: black;\n    stroke-width: 0;\n    fill: rgb(255,64,16);\n    opacity: 1.0;\n}\n\n.data_point text{\n    opacity: 0;\n    font-size: 20px;\n}\n\n.data_point:hover circle {\n    opacity: 1.0;\n    fill: red;\n    stroke-width: 2.0;\n}\n\n.data_point:hover text {\n    opacity: 1.0;\n}",
        "created": "20150608021257954",
        "modified": "20150608021613549",
        "tags": "$:/tags/Stylesheet",
        "title": "data_plot.css",
        "type": "text/css"
    },
    {
        "created": "20150608022456028",
        "text": "---\n!Data Set 1\n<$macrocall $name=PlotData rawdata={{Data Set 1!!data}}/>\n\n---\n!Data Set 2\n<$macrocall $name=PlotData rawdata={{Data Set 2!!data}}/>\n\n---\n!Data Set 1+ 2\n`<$macrocall $name=PlotData rawdata={{Data Set 1!!data}}{{Data Set 2!!data}}/>`\n\n<$macrocall $name=PlotData rawdata={{Data Set 1!!data}}{{Data Set 2!!data}}/>\n\n`<$macrocall $name=PlotData rawdata=\"{{Data Set 1!!data}}{{Data Set 2!!data}}\"/>`\n\n<$macrocall $name=PlotData rawdata=\"{{Data Set 1!!data}}{{Data Set 2!!data}}\"/>",
        "modified": "20150608025051070",
        "tags": "",
        "title": "Plot Data Sets"
    },
    {
        "text": "/*\\\ntitle: PlotData.js\ntype: application/javascript\nmodule-type: macro\n\nMacro to return a formatted version of the current time\n\n\\*/\n(function(){\n\n/*jslint node: true, browser: true */\n/*global $tw: false */\n\"use strict\";\n\n/*\nInformation about this macro\n*/\n\nexports.name = \"PlotData\";\n\nexports.params = [\n\t{name: \"rawdata\", default: \"{{0.1,0.1},{-0.1,0.0},{0.0,-0.1}}\"}\n];\n\n/*\nRun the macro\n*/\nexports.run = function(rawdata) {\n\n\tvar html = 'Input Raw Data ( length = '+rawdata.length+' ):<br><pre><code>'+rawdata.replace(/\\{/g,'(').replace(/\\}/g,')')+'</code></pre><br>';\n\n  // Data Points Graphics\n  var gPoints = '';\n  var data;\n  data = rawdata.replace(/\\s*/g, '').replace(/\\}\\}\\{\\{/g,'},{').replace('{{','').replace('}}','').split('},{');\n  for ( var i=0 ; i<data.length ; i++ ) {\n      data[i] = data[i].split(',');\n      for ( var j=0 ; j<data[i].length ; j++ ) {\n        data[i][j] = 30*parseFloat(data[i][j]);\n      }\n  }\n  for ( i=0 ; i<data.length ; i++ ) {\n      gPoints = gPoints + '<g class=\"data_point\">\\n<circle cx=\"'+(200+data[i][0])+'\" cy=\"'+(200-data[i][1])+'\" r=\"5\" />\\n<text x=\"'+(200+data[i][0])+'\" y=\"'+(200-data[i][1])+'\" dx=\"15\" dy=\"5\">'+(i+1)+'</text>\\n</g>';\n  }\n  \n  //  SVG\n  html = html + '<svg class=\"data_plot\" width=\"400\" height=\"400\" cursor=\"crosshair\">\\n' +\n'    <line x1=\"50\" y1=\"200\" x2=\"350\" y2=\"200\" stroke=\"grey\" stroke-width=\"1\" />\\n' +\n'    <line x1=\"200\" y1=\"50\" x2=\"200\" y2=\"350\" stroke=\"grey\" stroke-width=\"1\" />\\n' +\n'  <g>\\n' +\ngPoints +\n'   </g>\\n' +\n'</svg>';\n\n  return html;\n};\n\n})()",
        "created": "20150608020341888",
        "modified": "20150608024752234",
        "module-type": "macro",
        "tags": "",
        "title": "PlotData.js",
        "type": "application/javascript"
    }
]
