diff --git a/plotly/plotly_aux/jsonlab/AUTHORS.txt b/plotly/plotly_aux/jsonlab/AUTHORS.txt
deleted file mode 100755
index 9dd3fc7b..00000000
--- a/plotly/plotly_aux/jsonlab/AUTHORS.txt
+++ /dev/null
@@ -1,41 +0,0 @@
-The author of "jsonlab" toolbox is Qianqian Fang. Qianqian
-is currently an Assistant Professor at Massachusetts General Hospital, 
-Harvard Medical School.
-
-Address: Martinos Center for Biomedical Imaging, 
-         Massachusetts General Hospital, 
-         Harvard Medical School
-         Bldg 149, 13th St, Charlestown, MA 02129, USA
-URL: http://nmr.mgh.harvard.edu/~fangq/
-Email: <fangq at nmr.mgh.harvard.edu> or <fangqq at gmail.com>
-
-
-The script loadjson.m was built upon previous works by
-
-- Nedialko Krouchev: http://www.mathworks.com/matlabcentral/fileexchange/25713
-       date: 2009/11/02
-- François Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393
-       date: 2009/03/22
-- Joel Feenstra: http://www.mathworks.com/matlabcentral/fileexchange/20565
-       date: 2008/07/03
-
-
-This toolbox contains patches submitted by the following contributors:
-
-- Blake Johnson <bjohnso at bbn.com>
-  part of revision 341
-
-- Niclas Borlin <Niclas.Borlin at cs.umu.se>
-  various fixes in revision 394, including
-  - loadjson crashes for all-zero sparse matrix.
-  - loadjson crashes for empty sparse matrix.
-  - Non-zero size of 0-by-N and N-by-0 empty matrices is lost after savejson/loadjson.
-  - loadjson crashes for sparse real column vector.
-  - loadjson crashes for sparse complex column vector.
-  - Data is corrupted by savejson for sparse real row vector.
-  - savejson crashes for sparse complex row vector. 
-
-- Yul Kang <yul.kang.on at gmail.com>
-  patches for svn revision 415.
-  - savejson saves an empty cell array as [] instead of null
-  - loadjson differentiates an empty struct from an empty array
diff --git a/plotly/plotly_aux/jsonlab/ChangeLog.txt b/plotly/plotly_aux/jsonlab/ChangeLog.txt
deleted file mode 100755
index 5e0cb14d..00000000
--- a/plotly/plotly_aux/jsonlab/ChangeLog.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-============================================================================
-
-   JSONlab - a toolbox to encode/decode JSON/UBJSON files in MATLAB/Octave
-
-----------------------------------------------------------------------------
-
-JSONlab ChangeLog (key features marked by *):
-
-== JSONlab 0.9.9 (codename: Optimus - beta), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2014/01/22  use binary read and write in saveubjson and loadubjson
-
-== JSONlab 0.9.8-1 (codename: Optimus - alpha update 1), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2013/10/07 better round-trip conservation for empty arrays and structs (patch submitted by Yul Kang)
-
-== JSONlab 0.9.8 (codename: Optimus - alpha), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
- 2013/08/23 *universal Binary JSON (UBJSON) support, including both saveubjson and loadubjson
-
-== JSONlab 0.9.1 (codename: Rodimus, update 1), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
- 2012/12/18 *handling of various empty and sparse matrices (fixes submitted by Niclas Borlin)
-
-== JSONlab 0.9.0 (codename: Rodimus), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2012/06/17 *new format for an invalid leading char, unpacking hex code in savejson
- 2012/06/01  support JSONP in savejson
- 2012/05/25  fix the empty cell bug (reported by Cyril Davin)
- 2012/04/05  savejson can save to a file (suggested by Patrick Rapin)
-
-== JSONlab 0.8.1 (codename: Sentiel, Update 1), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2012/02/28  loadjson quotation mark escape bug, see http://bit.ly/yyk1nS
- 2012/01/25  patch to handle root-less objects, contributed by Blake Johnson
-
-== JSONlab 0.8.0 (codename: Sentiel), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2012/01/13 *speed up loadjson by 20 fold when parsing large data arrays in matlab
- 2012/01/11  remove row bracket if an array has 1 element, suggested by Mykel Kochenderfer
- 2011/12/22 *accept sequence of 'param',value input in savejson and loadjson
- 2011/11/18  fix struct array bug reported by Mykel Kochenderfer
-
-== JSONlab 0.5.1 (codename: Nexus Update 1), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2011/10/21  fix a bug in loadjson, previous code does not use any of the acceleration
- 2011/10/20  loadjson supports JSON collections - concatenated JSON objects
-
-== JSONlab 0.5.0 (codename: Nexus), FangQ <fangq (at) nmr.mgh.harvard.edu> ==
-
- 2011/10/16  package and release jsonlab 0.5.0
- 2011/10/15 *add json demo and regression test, support cpx numbers, fix double quote bug
- 2011/10/11 *speed up readjson dramatically, interpret _Array* tags, show data in root level
- 2011/10/10  create jsonlab project, start jsonlab website, add online documentation
- 2011/10/07 *speed up savejson by 25x using sprintf instead of mat2str, add options support
- 2011/10/06 *savejson works for structs, cells and arrays
- 2011/09/09  derive loadjson from JSON parser from MATLAB Central, draft savejson.m
diff --git a/plotly/plotly_aux/jsonlab/LICENSE_BSD.txt b/plotly/plotly_aux/jsonlab/LICENSE_BSD.txt
deleted file mode 100755
index 5c5cef55..00000000
--- a/plotly/plotly_aux/jsonlab/LICENSE_BSD.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Copyright 2011-2014 Qianqian Fang <fangq at nmr.mgh.harvard.edu>. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
-
-   1. Redistributions of source code must retain the above copyright notice, this list of
-      conditions and the following disclaimer.
-
-   2. Redistributions in binary form must reproduce the above copyright notice, this list
-      of conditions and the following disclaimer in the documentation and/or other materials
-      provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ''AS IS'' AND ANY EXPRESS OR IMPLIED
-WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS 
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-The views and conclusions contained in the software and documentation are those of the
-authors and should not be interpreted as representing official policies, either expressed
-or implied, of the copyright holders.
diff --git a/plotly/plotly_aux/jsonlab/README.txt b/plotly/plotly_aux/jsonlab/README.txt
deleted file mode 100755
index ad8c2d87..00000000
--- a/plotly/plotly_aux/jsonlab/README.txt
+++ /dev/null
@@ -1,335 +0,0 @@
-===============================================================================
-=                                 JSONlab                                     =
-=           An open-source MATLAB/Octave JSON encoder and decoder             =
-===============================================================================
-
-*Copyright (c) 2011-2014  Qianqian Fang <fangq at nmr.mgh.harvard.edu>
-*License: BSD license, see License*.txt
-*Version: 0.9.9 (Optimus - beta)
-
--------------------------------------------------------------------------------
-
-Table of Content:
-
-I.  Introduction
-II. Installation
-III.Using JSONlab
-IV. Known Issues and TODOs
-V.  Contribution and feedback
-
--------------------------------------------------------------------------------
-
-I.  Introduction
-
-JSON ([http://www.json.org/ JavaScript Object Notation]) is a highly portable, 
-human-readable and "[http://en.wikipedia.org/wiki/JSON fat-free]" text format 
-to represent complex and hierarchical data. It is as powerful as 
-[http://en.wikipedia.org/wiki/XML XML], but less verbose. JSON format is widely 
-used for data-exchange in applications, and is essential for the wild success 
-of [http://en.wikipedia.org/wiki/Ajax_(programming) Ajax] and 
-[http://en.wikipedia.org/wiki/Web_2.0 Web2.0]. 
-
-UBJSON (Universal Binary JSON) is a binary JSON format, specifically 
-optimized for compact file size and better performance while keeping
-the semantics as simple as the text-based JSON format. Using the UBJSON
-format allows to wrap complex binary data in a flexible and extensible
-structure, making it possible to process complex and large dataset 
-without accuracy loss due to text conversions.
-
-We envision that both JSON and its binary version will serve as part of 
-the mainstream data-exchange formats for scientific research in the future. 
-It will provide the flexibility and generality achieved by other popular 
-general-purpose file specifications, such as
-[http://www.hdfgroup.org/HDF5/whatishdf5.html HDF5], with significantly 
-reduced complexity and enhanced performance.
-
-JSONlab is a free and open-source implementation of a JSON/UBJSON encoder 
-and a decoder in the native MATLAB language. It can be used to convert a MATLAB 
-data structure (array, struct, cell, struct array and cell array) into 
-JSON/UBJSON formatted strings, or to decode a JSON/UBJSON file into MATLAB 
-data structure. JSONlab supports both MATLAB and  
-[http://www.gnu.org/software/octave/ GNU Octave] (a free MATLAB clone).
-
--------------------------------------------------------------------------------
-
-II. Installation
-
-The installation of JSONlab is no different than any other simple
-MATLAB toolbox. You only need to download/unzip the JSONlab package
-to a folder, and add the folder's path to MATLAB/Octave's path list
-by using the following command:
-
-    addpath('/path/to/jsonlab');
-
-If you want to add this path permanently, you need to type "pathtool", 
-browse to the jsonlab root folder and add to the list, then click "Save".
-Then, run "rehash" in MATLAB, and type "which loadjson", if you see an 
-output, that means JSONlab is installed for MATLAB/Octave.
-
--------------------------------------------------------------------------------
-
-III.Using JSONlab
-
-JSONlab provides two functions, loadjson.m -- a MATLAB->JSON decoder, 
-and savejson.m -- a MATLAB->JSON encoder, for the text-based JSON, and 
-two equivallent functions -- loadubjson and saveubjson for the binary 
-JSON. The detailed help info for the four functions can be found below:
-
-=== loadjson.m ===
-<pre>
-  data=loadjson(fname,opt)
-     or
-  data=loadjson(fname,'param1',value1,'param2',value2,...)
- 
-  parse a JSON (JavaScript Object Notation) file or string
- 
-  authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-             date: 2011/09/09
-          Nedialko Krouchev: http://www.mathworks.com/matlabcentral/fileexchange/25713
-             date: 2009/11/02
-          Fran�ois Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393
-             date: 2009/03/22
-          Joel Feenstra:
-          http://www.mathworks.com/matlabcentral/fileexchange/20565
-             date: 2008/07/03
- 
-  $Id: loadjson.m 394 2012-12-18 17:58:11Z fangq $
- 
-  input:
-       fname: input file name, if fname contains "{}" or "[]", fname
-              will be interpreted as a JSON string
-       opt: a struct to store parsing options, opt can be replaced by 
-            a list of ('param',value) pairs. The param string is equivallent
-            to a field in opt.
- 
-  output:
-       dat: a cell array, where {...} blocks are converted into cell arrays,
-            and [...] are converted to arrays
-</pre>
-
-=== savejson.m ===
-
-<pre>
-  json=savejson(rootname,obj,filename)
-     or
-  json=savejson(rootname,obj,opt)
-  json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
- 
-  convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
-  Object Notation) string
- 
-  author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-             created on 2011/09/09
- 
-  $Id: savejson.m 394 2012-12-18 17:58:11Z fangq $
- 
-  input:
-       rootname: name of the root-object, if set to '', will use variable name
-       obj: a MATLAB object (array, cell, cell array, struct, struct array)
-       filename: a string for the file name to save the output JSON data
-       opt: a struct for additional options, use [] if all use default
-         opt can have the following fields (first in [.|.] is the default)
- 
-         opt.FileName [''|string]: a file name to save the output JSON data
-         opt.FloatFormat ['%.10g'|string]: format to show each numeric element
-                          of a 1D/2D array;
-         opt.ArrayIndent [1|0]: if 1, output explicit data array with
-                          precedent indentation; if 0, no indentation
-         opt.ArrayToStruct[0|1]: when set to 0, savejson outputs 1D/2D
-                          array in JSON array format; if sets to 1, an
-                          array will be shown as a struct with fields
-                          "_ArrayType_", "_ArraySize_" and "_ArrayData_"; for
-                          sparse arrays, the non-zero elements will be
-                          saved to _ArrayData_ field in triplet-format i.e.
-                          (ix,iy,val) and "_ArrayIsSparse_" will be added
-                          with a value of 1; for a complex array, the 
-                          _ArrayData_ array will include two columns 
-                          (4 for sparse) to record the real and imaginary 
-                          parts, and also "_ArrayIsComplex_":1 is added. 
-         opt.ParseLogical [0|1]: if this is set to 1, logical array elem
-                          will use true/false rather than 1/0.
-         opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single
-                          numerical element will be shown without a square
-                          bracket, unless it is the root object; if 0, square
-                          brackets are forced for any numerical arrays.
-         opt.ForceRootName [0|1]: when set to 1 and rootname is empty, savejson
-                          will use the name of the passed obj variable as the 
-                          root object name; if obj is an expression and 
-                          does not have a name, 'root' will be used; if this 
-                          is set to 0 and rootname is empty, the root level 
-                          will be merged down to the lower level.
-         opt.Inf ['"$1_Inf_"'|string]: a customized regular expression pattern
-                          to represent +/-Inf. The matched pattern is '([-+]*)Inf'
-                          and $1 represents the sign. For those who want to use
-                          1e999 to represent Inf, they can set opt.Inf to '$11e999'
-         opt.NaN ['"_NaN_"'|string]: a customized regular expression pattern
-                          to represent NaN
-         opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),
-                          for example, if opt.JSON='foo', the JSON data is
-                          wrapped inside a function call as 'foo(...);'
-         opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson 
-                          back to the string form
-         opt can be replaced by a list of ('param',value) pairs. The param 
-         string is equivallent to a field in opt.
-  output:
-       json: a string in the JSON format (see http://json.org)
- 
-  examples:
-       a=struct('node',[1  9  10; 2 1 1.2], 'elem',[9 1;1 2;2 3],...
-            'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ');
-       savejson('mesh',a)
-       savejson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g')
-</pre>
-
-=== loadubjson.m ===
-
-<pre>
-  data=loadubjson(fname,opt)
-     or
-  data=loadubjson(fname,'param1',value1,'param2',value2,...)
- 
-  parse a JSON (JavaScript Object Notation) file or string
- 
-  authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-             date: 2013/08/01
- 
-  $Id: loadubjson.m 410 2013-08-24 03:33:18Z fangq $
- 
-  input:
-       fname: input file name, if fname contains "{}" or "[]", fname
-              will be interpreted as a UBJSON string
-       opt: a struct to store parsing options, opt can be replaced by 
-            a list of ('param',value) pairs. The param string is equivallent
-            to a field in opt.
- 
-  output:
-       dat: a cell array, where {...} blocks are converted into cell arrays,
-            and [...] are converted to arrays
-</pre>
-
-=== saveubjson.m ===
-
-<pre>
-  json=saveubjson(rootname,obj,filename)
-     or
-  json=saveubjson(rootname,obj,opt)
-  json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
- 
-  convert a MATLAB object (cell, struct or array) into a Universal 
-  Binary JSON (UBJSON) binary string
- 
-  author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-             created on 2013/08/17
- 
-  $Id: saveubjson.m 410 2013-08-24 03:33:18Z fangq $
- 
-  input:
-       rootname: name of the root-object, if set to '', will use variable name
-       obj: a MATLAB object (array, cell, cell array, struct, struct array)
-       filename: a string for the file name to save the output JSON data
-       opt: a struct for additional options, use [] if all use default
-         opt can have the following fields (first in [.|.] is the default)
- 
-         opt.FileName [''|string]: a file name to save the output JSON data
-         opt.ArrayToStruct[0|1]: when set to 0, saveubjson outputs 1D/2D
-                          array in JSON array format; if sets to 1, an
-                          array will be shown as a struct with fields
-                          "_ArrayType_", "_ArraySize_" and "_ArrayData_"; for
-                          sparse arrays, the non-zero elements will be
-                          saved to _ArrayData_ field in triplet-format i.e.
-                          (ix,iy,val) and "_ArrayIsSparse_" will be added
-                          with a value of 1; for a complex array, the 
-                          _ArrayData_ array will include two columns 
-                          (4 for sparse) to record the real and imaginary 
-                          parts, and also "_ArrayIsComplex_":1 is added. 
-         opt.ParseLogical [1|0]: if this is set to 1, logical array elem
-                          will use true/false rather than 1/0.
-         opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single
-                          numerical element will be shown without a square
-                          bracket, unless it is the root object; if 0, square
-                          brackets are forced for any numerical arrays.
-         opt.ForceRootName [0|1]: when set to 1 and rootname is empty, saveubjson
-                          will use the name of the passed obj variable as the 
-                          root object name; if obj is an expression and 
-                          does not have a name, 'root' will be used; if this 
-                          is set to 0 and rootname is empty, the root level 
-                          will be merged down to the lower level.
-         opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),
-                          for example, if opt.JSON='foo', the JSON data is
-                          wrapped inside a function call as 'foo(...);'
-         opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson 
-                          back to the string form
-         opt can be replaced by a list of ('param',value) pairs. The param 
-         string is equivallent to a field in opt.
-  output:
-       json: a string in the JSON format (see http://json.org)
- 
-  examples:
-       a=struct('node',[1  9  10; 2 1 1.2], 'elem',[9 1;1 2;2 3],...
-            'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ');
-       saveubjson('mesh',a)
-       saveubjson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g')
-</pre>
-
-
-=== examples ===
-
-Under the "examples" folder, you can find several scripts to demonstrate the
-basic utilities of JSONlab. Running the "demo_jsonlab_basic.m" script, you 
-will see the conversions from MATLAB data structure to JSON text and backward.
-In "jsonlab_selftest.m", we load complex JSON files downloaded from the Internet
-and validate the loadjson/savejson functions for regression testing purposes.
-Similarly, a "demo_ubjson_basic.m" script is provided to test the saveubjson
-and loadubjson pairs for various matlab data structures.
-
-Please run these examples and understand how JSONlab works before you use
-it to process your data.
-
--------------------------------------------------------------------------------
-
-IV. Known Issues and TODOs
-
-JSONlab has several known limitations. We are striving to make it more general
-and robust. Hopefully in a few future releases, the limitations become less.
-
-Here are the known issues:
-
-# Any high-dimensional cell-array will be converted to a 1D array;
-# When processing names containing multi-byte characters, Octave and MATLAB \
-can give different field-names; you can use feature('DefaultCharacterSet','latin1') \
-in MATLAB to get consistant results
-# Can not handle classes.
-# saveubjson has not yet supported arbitrary data ([H] in the UBJSON specification)
-# saveubjson now converts a logical array into a uint8 ([U]) array for now
-# an unofficial N-D array count syntax is implemented in saveubjson. We are \
-actively communicating with the UBJSON spec maintainer to investigate the \
-possibility of making it upstream
-
--------------------------------------------------------------------------------
-
-V. Contribution and feedback
-
-JSONlab is an open-source project. This means you can not only use it and modify
-it as you wish, but also you can contribute your changes back to JSONlab so
-that everyone else can enjoy the improvement. For anyone who want to contribute,
-please download JSONlab source code from it's subversion repository by using the
-following command:
-
- svn checkout svn://svn.code.sf.net/p/iso2mesh/code/trunk/jsonlab jsonlab
-
-You can make changes to the files as needed. Once you are satisfied with your
-changes, and ready to share it with others, please cd the root directory of 
-JSONlab, and type
-
- svn diff > yourname_featurename.patch
-
-You then email the .patch file to JSONlab's maintainer, Qianqian Fang, at
-the email address shown in the beginning of this file. Qianqian will review 
-the changes and commit it to the subversion if they are satisfactory.
-
-We appreciate any suggestions and feedbacks from you. Please use iso2mesh's
-mailing list to report any questions you may have with JSONlab:
-
-http://groups.google.com/group/iso2mesh-users?hl=en&pli=1
-
-(Subscription to the mailing list is needed in order to post messages).
diff --git a/plotly/plotly_aux/jsonlab/examples/demo_jsonlab_basic.m b/plotly/plotly_aux/jsonlab/examples/demo_jsonlab_basic.m
deleted file mode 100755
index d094a64e..00000000
--- a/plotly/plotly_aux/jsonlab/examples/demo_jsonlab_basic.m
+++ /dev/null
@@ -1,161 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%         Demonstration of Basic Utilities of JSONlab
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-rngstate = rand ('state');
-randseed=hex2dec('623F9A9E');
-clear data2json json2data
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a simple scalar value \n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=pi
-savejson('',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex number\n')
-fprintf(1,'%%=================================================\n\n')
-
-clear i;
-data2json=1+2*i
-savejson('',data2json)
-json2data=loadjson(ans) 
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=magic(6);
-data2json=data2json(:,1:3)+data2json(:,4:6)*i
-savejson('',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  MATLAB special constants\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=[NaN Inf -Inf]
-savejson('specials',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a real sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sprand(10,10,0.1)
-savejson('sparse',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-data2json*i
-savejson('complex_sparse',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an all-zero sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse(2,3);
-savejson('all_zero_sparse',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([]);
-savejson('empty_sparse',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty 0-by-0 real matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=[];
-savejson('empty_0by0_real',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty 0-by-3 real matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=zeros(0,3);
-savejson('empty_0by3_real',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse real column vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([0,3,0,1,4]');
-savejson('sparse_column_vector',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse complex column vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-1i*data2json;
-savejson('complex_sparse_column_vector',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse real row vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([0,3,0,1,4]);
-savejson('sparse_row_vector',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse complex row vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-1i*data2json;
-savejson('complex_sparse_row_vector',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a structure\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=struct('name','Think Different','year',1997,'magic',magic(3),...
-                 'misfits',[Inf,NaN],'embedded',struct('left',true,'right',false))
-savejson('astruct',data2json,struct('ParseLogical',1))
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a structure array\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=struct('name','Nexus Prime','rank',9);
-data2json(2)=struct('name','Sentinel Prime','rank',9);
-data2json(3)=struct('name','Optimus Prime','rank',9);
-savejson('Supreme Commander',data2json)
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a cell array\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=cell(3,1);
-data2json{1}=struct('buzz',1.1,'rex',1.2,'bo',1.3,'hamm',2.0,'slink',2.1,'potato',2.2,...
-              'woody',3.0,'sarge',3.1,'etch',4.0,'lenny',5.0,'squeeze',6.0,'wheezy',7.0);
-data2json{2}=struct('Ubuntu',['Kubuntu';'Xubuntu';'Lubuntu']);
-data2json{3}=[10.04,10.10,11.04,11.10]
-savejson('debian',data2json,struct('FloatFormat','%.2f'))
-json2data=loadjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  invalid field-name handling\n')
-fprintf(1,'%%=================================================\n\n')
-
-json2data=loadjson('{"ValidName":1, "_InvalidName":2, ":Field:":3, "项目":"绝密"}')
-
-rand ('state',rngstate);
-
diff --git a/plotly/plotly_aux/jsonlab/examples/demo_ubjson_basic.m b/plotly/plotly_aux/jsonlab/examples/demo_ubjson_basic.m
deleted file mode 100755
index fd5096c3..00000000
--- a/plotly/plotly_aux/jsonlab/examples/demo_ubjson_basic.m
+++ /dev/null
@@ -1,161 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%         Demonstration of Basic Utilities of JSONlab
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-rngstate = rand ('state');
-randseed=hex2dec('623F9A9E');
-clear data2json json2data
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a simple scalar value \n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=pi
-saveubjson('',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex number\n')
-fprintf(1,'%%=================================================\n\n')
-
-clear i;
-data2json=1+2*i
-saveubjson('',data2json)
-json2data=loadubjson(ans) 
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=magic(6);
-data2json=data2json(:,1:3)+data2json(:,4:6)*i
-saveubjson('',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  MATLAB special constants\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=[NaN Inf -Inf]
-saveubjson('specials',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a real sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sprand(10,10,0.1)
-saveubjson('sparse',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a complex sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-data2json*i
-saveubjson('complex_sparse',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an all-zero sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse(2,3);
-saveubjson('all_zero_sparse',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty sparse matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([]);
-saveubjson('empty_sparse',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty 0-by-0 real matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=[];
-saveubjson('empty_0by0_real',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  an empty 0-by-3 real matrix\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=zeros(0,3);
-saveubjson('empty_0by3_real',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse real column vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([0,3,0,1,4]');
-saveubjson('sparse_column_vector',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse complex column vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-1i*data2json;
-saveubjson('complex_sparse_column_vector',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse real row vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=sparse([0,3,0,1,4]);
-saveubjson('sparse_row_vector',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a sparse complex row vector\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=data2json-1i*data2json;
-saveubjson('complex_sparse_row_vector',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a structure\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=struct('name','Think Different','year',1997,'magic',magic(3),...
-                 'misfits',[Inf,NaN],'embedded',struct('left',true,'right',false))
-saveubjson('astruct',data2json,struct('ParseLogical',1))
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a structure array\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=struct('name','Nexus Prime','rank',9);
-data2json(2)=struct('name','Sentinel Prime','rank',9);
-data2json(3)=struct('name','Optimus Prime','rank',9);
-saveubjson('Supreme Commander',data2json)
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  a cell array\n')
-fprintf(1,'%%=================================================\n\n')
-
-data2json=cell(3,1);
-data2json{1}=struct('buzz',1.1,'rex',1.2,'bo',1.3,'hamm',2.0,'slink',2.1,'potato',2.2,...
-              'woody',3.0,'sarge',3.1,'etch',4.0,'lenny',5.0,'squeeze',6.0,'wheezy',7.0);
-data2json{2}=struct('Ubuntu',['Kubuntu';'Xubuntu';'Lubuntu']);
-data2json{3}=[10.04,10.10,11.04,11.10]
-saveubjson('debian',data2json,struct('FloatFormat','%.2f'))
-json2data=loadubjson(ans)
-
-fprintf(1,'\n%%=================================================\n')
-fprintf(1,'%%  invalid field-name handling\n')
-fprintf(1,'%%=================================================\n\n')
-
-json2data=loadubjson(saveubjson('',loadjson('{"ValidName":1, "_InvalidName":2, ":Field:":3, "项目":"绝密"}')))
-
-rand ('state',rngstate);
-
diff --git a/plotly/plotly_aux/jsonlab/examples/example1.json b/plotly/plotly_aux/jsonlab/examples/example1.json
deleted file mode 100755
index be0993ef..00000000
--- a/plotly/plotly_aux/jsonlab/examples/example1.json
+++ /dev/null
@@ -1,23 +0,0 @@
- {
-     "firstName": "John",
-     "lastName": "Smith",
-     "age": 25,
-     "address":
-     {
-         "streetAddress": "21 2nd Street",
-         "city": "New York",
-         "state": "NY",
-         "postalCode": "10021"
-     },
-     "phoneNumber":
-     [
-         {
-           "type": "home",
-           "number": "212 555-1234"
-         },
-         {
-           "type": "fax",
-           "number": "646 555-4567"
-         }
-     ]
- }
diff --git a/plotly/plotly_aux/jsonlab/examples/example2.json b/plotly/plotly_aux/jsonlab/examples/example2.json
deleted file mode 100755
index eacfbf5e..00000000
--- a/plotly/plotly_aux/jsonlab/examples/example2.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-    "glossary": {
-        "title": "example glossary",
-		"GlossDiv": {
-            "title": "S",
-			"GlossList": {
-                "GlossEntry": {
-                    "ID": "SGML",
-					"SortAs": "SGML",
-					"GlossTerm": "Standard Generalized Markup Language",
-					"Acronym": "SGML",
-					"Abbrev": "ISO 8879:1986",
-					"GlossDef": {
-                        "para": "A meta-markup language, used to create markup languages such as DocBook.",
-						"GlossSeeAlso": ["GML", "XML"]
-                    },
-					"GlossSee": "markup"
-                }
-            }
-        }
-    }
-}
diff --git a/plotly/plotly_aux/jsonlab/examples/example3.json b/plotly/plotly_aux/jsonlab/examples/example3.json
deleted file mode 100755
index b7ca9411..00000000
--- a/plotly/plotly_aux/jsonlab/examples/example3.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{"menu": {
-  "id": "file",
-  "value": "_&File",
-  "popup": {
-    "menuitem": [
-      {"value": "_&New", "onclick": "CreateNewDoc(\"\"\")"},
-      {"value": "_&Open", "onclick": "OpenDoc()"},
-      {"value": "_&Close", "onclick": "CloseDoc()"}
-    ]
-  }
-}}
diff --git a/plotly/plotly_aux/jsonlab/examples/example4.json b/plotly/plotly_aux/jsonlab/examples/example4.json
deleted file mode 100755
index 66deeafb..00000000
--- a/plotly/plotly_aux/jsonlab/examples/example4.json
+++ /dev/null
@@ -1,34 +0,0 @@
-[
-  {
-      "sample" : {
-          "rho" : 1
-      }
-  },
-  {
-      "sample" : {
-          "rho" : 2
-      }
-  },
-  [
-    {
-        "_ArrayType_" : "double",
-        "_ArraySize_" : [1,2],
-        "_ArrayData_" : [1,0]
-    },
-    {
-        "_ArrayType_" : "double",
-        "_ArraySize_" : [1,2],
-        "_ArrayData_" : [1,1]
-    },
-    {
-        "_ArrayType_" : "double",
-        "_ArraySize_" : [1,2],
-        "_ArrayData_" : [1,2]
-    }
-  ],
-  [
-     "Paper",
-     "Scissors",
-     "Stone"
-  ]
-]
diff --git a/plotly/plotly_aux/jsonlab/examples/jsonlab_basictest.matlab b/plotly/plotly_aux/jsonlab/examples/jsonlab_basictest.matlab
deleted file mode 100755
index ff8380a1..00000000
--- a/plotly/plotly_aux/jsonlab/examples/jsonlab_basictest.matlab
+++ /dev/null
@@ -1,361 +0,0 @@
-
-                              < M A T L A B >
-                  Copyright 1984-2007 The MathWorks, Inc.
-                         Version 7.4.0.287 (R2007a)
-                              January 29, 2007
-
- 
-  To get started, type one of these: helpwin, helpdesk, or demo.
-  For product information, visit www.mathworks.com.
- 
->> >> >> >> >> >> >> >> >> 
-%=================================================
->> %  a simple scalar value 
->> %=================================================
-
->> >> 
-data2json =
-
-    3.1416
-
->> 
-ans =
-
-[3.141592654]
-
-
->> 
-json2data =
-
-    3.1416
-
->> >> 
-%=================================================
->> %  a complex number
->> %=================================================
-
->> >> >> 
-data2json =
-
-   1.0000 + 2.0000i
-
->> 
-ans =
-
-{
-	"_ArrayType_": "double",
-	"_ArraySize_": [1,1],
-	"_ArrayIsComplex_": 1,
-	"_ArrayData_": [1,2]
-}
-
-
->> 
-json2data =
-
-   1.0000 + 2.0000i
-
->> >> 
-%=================================================
->> %  a complex matrix
->> %=================================================
-
->> >> >> 
-data2json =
-
-  35.0000 +26.0000i   1.0000 +19.0000i   6.0000 +24.0000i
-   3.0000 +21.0000i  32.0000 +23.0000i   7.0000 +25.0000i
-  31.0000 +22.0000i   9.0000 +27.0000i   2.0000 +20.0000i
-   8.0000 +17.0000i  28.0000 +10.0000i  33.0000 +15.0000i
-  30.0000 +12.0000i   5.0000 +14.0000i  34.0000 +16.0000i
-   4.0000 +13.0000i  36.0000 +18.0000i  29.0000 +11.0000i
-
->> 
-ans =
-
-{
-	"_ArrayType_": "double",
-	"_ArraySize_": [6,3],
-	"_ArrayIsComplex_": 1,
-	"_ArrayData_": [
-		[35,26],
-		[3,21],
-		[31,22],
-		[8,17],
-		[30,12],
-		[4,13],
-		[1,19],
-		[32,23],
-		[9,27],
-		[28,10],
-		[5,14],
-		[36,18],
-		[6,24],
-		[7,25],
-		[2,20],
-		[33,15],
-		[34,16],
-		[29,11]
-	]
-}
-
-
->> 
-json2data =
-
-  35.0000 +26.0000i   1.0000 +19.0000i   6.0000 +24.0000i
-   3.0000 +21.0000i  32.0000 +23.0000i   7.0000 +25.0000i
-  31.0000 +22.0000i   9.0000 +27.0000i   2.0000 +20.0000i
-   8.0000 +17.0000i  28.0000 +10.0000i  33.0000 +15.0000i
-  30.0000 +12.0000i   5.0000 +14.0000i  34.0000 +16.0000i
-   4.0000 +13.0000i  36.0000 +18.0000i  29.0000 +11.0000i
-
->> >> 
-%=================================================
->> %  MATLAB special constants
->> %=================================================
-
->> >> 
-data2json =
-
-   NaN   Inf  -Inf
-
->> 
-ans =
-
-{
-	"specials": ["_NaN_","_Inf_","-_Inf_"]
-}
-
-
->> 
-json2data = 
-
-    specials: [NaN Inf -Inf]
-
->> >> 
-%=================================================
->> %  a real sparse matrix
->> %=================================================
-
->> >> 
-data2json =
-
-   (1,2)       0.6557
-   (9,2)       0.7577
-   (3,5)       0.8491
-  (10,5)       0.7431
-  (10,8)       0.3922
-   (7,9)       0.6787
-   (2,10)      0.0357
-   (6,10)      0.9340
-  (10,10)      0.6555
-
->> 
-ans =
-
-{
-	"sparse": {
-		"_ArrayType_": "double",
-		"_ArraySize_": [10,10],
-		"_ArrayIsSparse_": 1,
-		"_ArrayData_": [
-			[1,2,0.6557406992],
-			[9,2,0.7577401306],
-			[3,5,0.8491293059],
-			[10,5,0.7431324681],
-			[10,8,0.3922270195],
-			[7,9,0.6787351549],
-			[2,10,0.03571167857],
-			[6,10,0.9339932478],
-			[10,10,0.6554778902]
-		]
-	}
-}
-
-
->> 
-json2data = 
-
-    sparse: [10x10 double]
-
->> >> 
-%=================================================
->> %  a complex sparse matrix
->> %=================================================
-
->> >> 
-data2json =
-
-   (1,2)      0.6557 - 0.6557i
-   (9,2)      0.7577 - 0.7577i
-   (3,5)      0.8491 - 0.8491i
-  (10,5)      0.7431 - 0.7431i
-  (10,8)      0.3922 - 0.3922i
-   (7,9)      0.6787 - 0.6787i
-   (2,10)     0.0357 - 0.0357i
-   (6,10)     0.9340 - 0.9340i
-  (10,10)     0.6555 - 0.6555i
-
->> 
-ans =
-
-{
-	"complex_sparse": {
-		"_ArrayType_": "double",
-		"_ArraySize_": [10,10],
-		"_ArrayIsComplex_": 1,
-		"_ArrayIsSparse_": 1,
-		"_ArrayData_": [
-			[1,2,0.6557406992,-0.6557406992],
-			[9,2,0.7577401306,-0.7577401306],
-			[3,5,0.8491293059,-0.8491293059],
-			[10,5,0.7431324681,-0.7431324681],
-			[10,8,0.3922270195,-0.3922270195],
-			[7,9,0.6787351549,-0.6787351549],
-			[2,10,0.03571167857,-0.03571167857],
-			[6,10,0.9339932478,-0.9339932478],
-			[10,10,0.6554778902,-0.6554778902]
-		]
-	}
-}
-
-
->> 
-json2data = 
-
-    complex_sparse: [10x10 double]
-
->> >> 
-%=================================================
->> %  a structure
->> %=================================================
-
->> >> 
-data2json = 
-
-        name: 'Think Different'
-        year: 1997
-       magic: [3x3 double]
-     misfits: [Inf NaN]
-    embedded: [1x1 struct]
-
->> 
-ans =
-
-{
-	"astruct": {
-		"name": "Think Different",
-		"year": 1997,
-		"magic": [
-			[8,1,6],
-			[3,5,7],
-			[4,9,2]
-		],
-		"misfits": ["_Inf_","_NaN_"],
-		"embedded": {
-			"left": true,
-			"right": false
-		}
-	}
-}
-
-
->> 
-json2data = 
-
-    astruct: [1x1 struct]
-
->> >> 
-%=================================================
->> %  a structure array
->> %=================================================
-
->> >> >> >> >> 
-ans =
-
-{
-	"Supreme Commander": [
-		{
-			"name": "Nexus Prime",
-			"rank": 9
-		},
-		{
-			"name": "Sentinel Prime",
-			"rank": 9
-		},
-		{
-			"name": "Optimus Prime",
-			"rank": 9
-		}
-	]
-}
-
-
->> 
-json2data = 
-
-    Supreme_0x20_Commander: [1x3 struct]
-
->> >> 
-%=================================================
->> %  a cell array
->> %=================================================
-
->> >> >> >> >> 
-data2json = 
-
-    [1x1 struct]
-    [1x1 struct]
-    [1x4 double]
-
->> 
-ans =
-
-{
-	"debian": [
-		{
-			"buzz": 1.10,
-			"rex": 1.20,
-			"bo": 1.30,
-			"hamm": 2.00,
-			"slink": 2.10,
-			"potato": 2.20,
-			"woody": 3.00,
-			"sarge": 3.10,
-			"etch": 4.00,
-			"lenny": 5.00,
-			"squeeze": 6.00,
-			"wheezy": 7.00
-		},
-		{
-			"Ubuntu": [
-				"Kubuntu",
-				"Xubuntu",
-				"Lubuntu"
-			]
-		},
-		[10.04,10.10,11.04,11.10]
-	]
-}
-
-
->> 
-json2data = 
-
-    debian: {[1x1 struct]  [1x1 struct]  [10.0400 10.1000 11.0400 11.1000]}
-
->> >> 
-%=================================================
->> %  invalid field-name handling
->> %=================================================
-
->> >> 
-json2data = 
-
-               ValidName: 1
-       x0x5F_InvalidName: 2
-       x0x3A_Field_0x3A_: 3
-    x0xE9A1B9__0xE79BAE_: '绝密'
-
->> >> >> >> 
\ No newline at end of file
diff --git a/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.m b/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.m
deleted file mode 100755
index 1caaf28e..00000000
--- a/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.m
+++ /dev/null
@@ -1,22 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%         Regression Test Unit of loadjson and savejson
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-for i=1:4
-    fname=sprintf('example%d.json',i);
-    if(exist(fname,'file')==0) break; end
-    fprintf(1,'===============================================\n>> %s\n',fname);
-    json=savejson('data',loadjson(fname));
-    fprintf(1,'%s\n',json);
-    data=loadjson(json);
-end
-
-for i=1:4
-    fname=sprintf('example%d.json',i);
-    if(exist(fname,'file')==0) break; end
-    fprintf(1,'===============================================\n>> %s\n',fname);
-    json=saveubjson('data',loadjson(fname));
-    fprintf(1,'%s\n',json);
-    data=loadubjson(json);
-    savejson('',data)
-end
diff --git a/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.matlab b/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.matlab
deleted file mode 100755
index 84e66437..00000000
--- a/plotly/plotly_aux/jsonlab/examples/jsonlab_selftest.matlab
+++ /dev/null
@@ -1,121 +0,0 @@
-
-                              < M A T L A B >
-                  Copyright 1984-2007 The MathWorks, Inc.
-                         Version 7.4.0.287 (R2007a)
-                              January 29, 2007
-
- 
-  To get started, type one of these: helpwin, helpdesk, or demo.
-  For product information, visit www.mathworks.com.
- 
->> >> >> >> >> ===============================================
->> example1.json
-{
-	"data": {
-		"firstName": "John",
-		"lastName": "Smith",
-		"age": 25,
-		"address": {
-			"streetAddress": "21 2nd Street",
-			"city": "New York",
-			"state": "NY",
-			"postalCode": "10021"
-		},
-		"phoneNumber": [
-			{
-				"type": "home",
-				"number": "212 555-1234"
-			},
-			{
-				"type": "fax",
-				"number": "646 555-4567"
-			}
-		]
-	}
-}
-
-===============================================
->> example2.json
-{
-	"data": {
-		"glossary": {
-			"title": "example glossary",
-			"GlossDiv": {
-				"title": "S",
-				"GlossList": {
-					"GlossEntry": {
-						"ID": "SGML",
-						"SortAs": "SGML",
-						"GlossTerm": "Standard Generalized Markup Language",
-						"Acronym": "SGML",
-						"Abbrev": "ISO 8879:1986",
-						"GlossDef": {
-							"para": "A meta-markup language, used to create markup languages such as DocBook.",
-							"GlossSeeAlso": [
-								"GML",
-								"XML"
-							]
-						},
-						"GlossSee": "markup"
-					}
-				}
-			}
-		}
-	}
-}
-
-===============================================
->> example3.json
-{
-	"data": {
-		"menu": {
-			"id": "file",
-			"value": "_&File",
-			"popup": {
-				"menuitem": [
-					{
-						"value": "_&New",
-						"onclick": "CreateNewDoc(\"\"\")"
-					},
-					{
-						"value": "_&Open",
-						"onclick": "OpenDoc()"
-					},
-					{
-						"value": "_&Close",
-						"onclick": "CloseDoc()"
-					}
-				]
-			}
-		}
-	}
-}
-
-===============================================
->> example4.json
-{
-	"data": [
-		{
-			"sample": {
-				"rho": 1
-			}
-		},
-		{
-			"sample": {
-				"rho": 2
-			}
-		},
-		[
-				[1,0],
-				[1,1],
-				[1,2]
-		],
-		[
-				"Paper",
-				"Scissors",
-				"Stone"
-		]
-	]
-}
-
->> 
\ No newline at end of file
diff --git a/plotly/plotly_aux/jsonlab/examples/jsonlab_speedtest.m b/plotly/plotly_aux/jsonlab/examples/jsonlab_speedtest.m
deleted file mode 100755
index 4990fba0..00000000
--- a/plotly/plotly_aux/jsonlab/examples/jsonlab_speedtest.m
+++ /dev/null
@@ -1,21 +0,0 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%         Benchmarking processing speed of savejson and loadjson
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-datalen=[1e3 1e4 1e5 1e6];
-len=length(datalen);
-tsave=zeros(len,1);
-tload=zeros(len,1);
-for i=1:len
-    tic;
-    json=savejson('data',struct('d1',rand(datalen(i),3),'d2',rand(datalen(i),3)>0.5));
-    tsave(i)=toc;
-    data=loadjson(json);
-    tload(i)=toc-tsave(i);
-    fprintf(1,'matrix size: %d\n',datalen(i));
-end
-
-loglog(datalen,tsave,'o-',datalen,tload,'r*-');
-legend('savejson runtime (s)','loadjson runtime (s)');
-xlabel('array size');
-ylabel('running time (s)');
diff --git a/plotly/plotly_aux/jsonlab/jsonopt.m b/plotly/plotly_aux/jsonlab/jsonopt.m
deleted file mode 100755
index 235a007b..00000000
--- a/plotly/plotly_aux/jsonlab/jsonopt.m
+++ /dev/null
@@ -1,32 +0,0 @@
-function val=jsonopt(key,default,varargin)
-%
-% val=jsonopt(key,default,optstruct)
-%
-% setting options based on a struct. The struct can be produced
-% by varargin2struct from a list of 'param','value' pairs
-%
-% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-%
-% $Id: loadjson.m 371 2012-06-20 12:43:06Z fangq $
-%
-% input:
-%      key: a string with which one look up a value from a struct
-%      default: if the key does not exist, return default
-%      optstruct: a struct where each sub-field is a key 
-%
-% output:
-%      val: if key exists, val=optstruct.key; otherwise val=default
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-% 
-
-val=default;
-if(nargin<=2) return; end
-opt=varargin{1};
-if(isstruct(opt) && isfield(opt,key))
-    val=getfield(opt,key);
-end
-
diff --git a/plotly/plotly_aux/jsonlab/loadjson.m b/plotly/plotly_aux/jsonlab/loadjson.m
deleted file mode 100755
index 18c38216..00000000
--- a/plotly/plotly_aux/jsonlab/loadjson.m
+++ /dev/null
@@ -1,526 +0,0 @@
-function data = loadjson(fname,varargin)
-%
-% data=loadjson(fname,opt)
-%    or
-% data=loadjson(fname,'param1',value1,'param2',value2,...)
-%
-% parse a JSON (JavaScript Object Notation) file or string
-%
-% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-%            date: 2011/09/09
-%         Nedialko Krouchev: http://www.mathworks.com/matlabcentral/fileexchange/25713
-%            date: 2009/11/02
-%         François Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393
-%            date: 2009/03/22
-%         Joel Feenstra:
-%         http://www.mathworks.com/matlabcentral/fileexchange/20565
-%            date: 2008/07/03
-%
-% $Id: loadjson.m 415 2013-10-07 16:38:31Z fangq $
-%
-% input:
-%      fname: input file name, if fname contains "{}" or "[]", fname
-%             will be interpreted as a JSON string
-%      opt: a struct to store parsing options, opt can be replaced by 
-%           a list of ('param',value) pairs. The param string is equivallent
-%           to a field in opt.
-%
-% output:
-%      dat: a cell array, where {...} blocks are converted into cell arrays,
-%           and [...] are converted to arrays
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details 
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-global pos inStr len  esc index_esc len_esc isoct arraytoken
-
-if(regexp(fname,'[\{\}\]\[]','once'))
-   string=fname;
-elseif(exist(fname,'file'))
-   fid = fopen(fname,'rt');
-   string = fscanf(fid,'%c');
-   fclose(fid);
-else
-   error('input file does not exist');
-end
-
-pos = 1; len = length(string); inStr = string;
-isoct=exist('OCTAVE_VERSION');
-arraytoken=find(inStr=='[' | inStr==']' | inStr=='"');
-jstr=regexprep(inStr,'\\\\','  ');
-escquote=regexp(jstr,'\\"');
-arraytoken=sort([arraytoken escquote]);
-
-% String delimiters and escape chars identified to improve speed:
-esc = find(inStr=='"' | inStr=='\' ); % comparable to: regexp(inStr, '["\\]');
-index_esc = 1; len_esc = length(esc);
-
-opt=varargin2struct(varargin{:});
-jsoncount=1;
-while pos <= len
-    switch(next_char)
-        case '{'
-            data{jsoncount} = parse_object(opt);
-        case '['
-            data{jsoncount} = parse_array(opt);
-        otherwise
-            error_pos('Outer level structure must be an object or an array');
-    end
-    jsoncount=jsoncount+1;
-end % while
-
-jsoncount=length(data);
-if(jsoncount==1 && iscell(data))
-    data=data{1};
-end
-
-if(~isempty(data))
-      if(isstruct(data)) % data can be a struct array
-          data=jstruct2array(data);
-      elseif(iscell(data))
-          data=jcell2array(data);
-      end
-end
-
-
-%%
-function newdata=parse_collection(id,data,obj)
-
-if(jsoncount>0 && exist('data','var')) 
-    if(~iscell(data))
-       newdata=cell(1);
-       newdata{1}=data;
-       data=newdata;
-    end
-end
-
-%%
-function newdata=jcell2array(data)
-len=length(data);
-newdata=data;
-for i=1:len
-      if(isstruct(data{i}))
-          newdata{i}=jstruct2array(data{i});
-      elseif(iscell(data{i}))
-          newdata{i}=jcell2array(data{i});
-      end
-end
-
-%%-------------------------------------------------------------------------
-function newdata=jstruct2array(data)
-fn=fieldnames(data);
-newdata=data;
-len=length(data);
-for i=1:length(fn) % depth-first
-    for j=1:len
-        if(isstruct(getfield(data(j),fn{i})))
-            newdata(j)=setfield(newdata(j),fn{i},jstruct2array(getfield(data(j),fn{i})));
-        end
-    end
-end
-if(~isempty(strmatch('x0x5F_ArrayType_',fn)) && ~isempty(strmatch('x0x5F_ArrayData_',fn)))
-  newdata=cell(len,1);
-  for j=1:len
-    ndata=cast(data(j).x0x5F_ArrayData_,data(j).x0x5F_ArrayType_);
-    iscpx=0;
-    if(~isempty(strmatch('x0x5F_ArrayIsComplex_',fn)))
-        if(data(j).x0x5F_ArrayIsComplex_)
-           iscpx=1;
-        end
-    end
-    if(~isempty(strmatch('x0x5F_ArrayIsSparse_',fn)))
-        if(data(j).x0x5F_ArrayIsSparse_)
-            if(~isempty(strmatch('x0x5F_ArraySize_',fn)))
-                dim=data(j).x0x5F_ArraySize_;
-                if(iscpx && size(ndata,2)==4-any(dim==1))
-                    ndata(:,end-1)=complex(ndata(:,end-1),ndata(:,end));
-                end
-                if isempty(ndata)
-                    % All-zeros sparse
-                    ndata=sparse(dim(1),prod(dim(2:end)));
-                elseif dim(1)==1
-                    % Sparse row vector
-                    ndata=sparse(1,ndata(:,1),ndata(:,2),dim(1),prod(dim(2:end)));
-                elseif dim(2)==1
-                    % Sparse column vector
-                    ndata=sparse(ndata(:,1),1,ndata(:,2),dim(1),prod(dim(2:end)));
-                else
-                    % Generic sparse array.
-                    ndata=sparse(ndata(:,1),ndata(:,2),ndata(:,3),dim(1),prod(dim(2:end)));
-                end
-            else
-                if(iscpx && size(ndata,2)==4)
-                    ndata(:,3)=complex(ndata(:,3),ndata(:,4));
-                end
-                ndata=sparse(ndata(:,1),ndata(:,2),ndata(:,3));
-            end
-        end
-    elseif(~isempty(strmatch('x0x5F_ArraySize_',fn)))
-        if(iscpx && size(ndata,2)==2)
-             ndata=complex(ndata(:,1),ndata(:,2));
-        end
-        ndata=reshape(ndata(:),data(j).x0x5F_ArraySize_);
-    end
-    newdata{j}=ndata;
-  end
-  if(len==1)
-      newdata=newdata{1};
-  end
-end
-
-%%-------------------------------------------------------------------------
-function object = parse_object(varargin)
-    parse_char('{');
-    object = [];
-    if next_char ~= '}'
-        while 1
-            str = parseStr(varargin{:});
-            if isempty(str)
-                error_pos('Name of value at position %d cannot be empty');
-            end
-            parse_char(':');
-            val = parse_value(varargin{:});
-            eval( sprintf( 'object.%s  = val;', valid_field(str) ) );
-            if next_char == '}'
-                break;
-            end
-            parse_char(',');
-        end
-    end
-    parse_char('}');
-
-%%-------------------------------------------------------------------------
-
-function object = parse_array(varargin) % JSON array is written in row-major order
-global pos inStr isoct
-    parse_char('[');
-    object = cell(0, 1);
-    dim2=[];
-    if next_char ~= ']'
-        [endpos e1l e1r maxlevel]=matching_bracket(inStr,pos);
-        arraystr=['[' inStr(pos:endpos)];
-        arraystr=regexprep(arraystr,'"_NaN_"','NaN');
-        arraystr=regexprep(arraystr,'"([-+]*)_Inf_"','$1Inf');
-        arraystr(find(arraystr==sprintf('\n')))=[];
-        arraystr(find(arraystr==sprintf('\r')))=[];
-        %arraystr=regexprep(arraystr,'\s*,',','); % this is slow,sometimes needed
-        if(~isempty(e1l) && ~isempty(e1r)) % the array is in 2D or higher D
-            astr=inStr((e1l+1):(e1r-1));
-            astr=regexprep(astr,'"_NaN_"','NaN');
-            astr=regexprep(astr,'"([-+]*)_Inf_"','$1Inf');
-            astr(find(astr==sprintf('\n')))=[];
-            astr(find(astr==sprintf('\r')))=[];
-            astr(find(astr==' '))='';
-            if(isempty(find(astr=='[', 1))) % array is 2D
-                dim2=length(sscanf(astr,'%f,',[1 inf]));
-            end
-        else % array is 1D
-            astr=arraystr(2:end-1);
-            astr(find(astr==' '))='';
-            [obj count errmsg nextidx]=sscanf(astr,'%f,',[1,inf]);
-            if(nextidx>=length(astr)-1)
-                object=obj;
-                pos=endpos;
-                parse_char(']');
-                return;
-            end
-        end
-        if(~isempty(dim2))
-            astr=arraystr;
-            astr(find(astr=='['))='';
-            astr(find(astr==']'))='';
-            astr(find(astr==' '))='';
-            [obj count errmsg nextidx]=sscanf(astr,'%f,',inf);
-            if(nextidx>=length(astr)-1)
-                object=reshape(obj,dim2,numel(obj)/dim2)';
-                pos=endpos;
-                parse_char(']');
-                return;
-            end
-        end
-        arraystr=regexprep(arraystr,'\]\s*,','];');
-        try
-           if(isoct && regexp(arraystr,'"','once'))
-                error('Octave eval can produce empty cells for JSON-like input');
-           end
-           object=eval(arraystr);
-           pos=endpos;
-        catch
-         while 1
-            val = parse_value(varargin{:});
-            object{end+1} = val;
-            if next_char == ']'
-                break;
-            end
-            parse_char(',');
-         end
-        end
-    end
-    if(jsonopt('SimplifyCell',0,varargin{:})==1)
-      try
-        oldobj=object;
-        object=cell2mat(object')';
-        if(iscell(oldobj) && isstruct(object) && numel(object)>1 && jsonopt('SimplifyCellArray',1,varargin{:})==0)
-            object=oldobj;
-        elseif(size(object,1)>1 && ndims(object)==2)
-            object=object';
-        end
-      catch
-      end
-    end
-    parse_char(']');
-
-%%-------------------------------------------------------------------------
-
-function parse_char(c)
-    global pos inStr len
-    skip_whitespace;
-    if pos > len || inStr(pos) ~= c
-        error_pos(sprintf('Expected %c at position %%d', c));
-    else
-        pos = pos + 1;
-        skip_whitespace;
-    end
-
-%%-------------------------------------------------------------------------
-
-function c = next_char
-    global pos inStr len
-    skip_whitespace;
-    if pos > len
-        c = [];
-    else
-        c = inStr(pos);
-    end
-
-%%-------------------------------------------------------------------------
-
-function skip_whitespace
-    global pos inStr len
-    while pos <= len && isspace(inStr(pos))
-        pos = pos + 1;
-    end
-
-%%-------------------------------------------------------------------------
-function str = parseStr(varargin)
-    global pos inStr len  esc index_esc len_esc
- % len, ns = length(inStr), keyboard
-    if inStr(pos) ~= '"'
-        error_pos('String starting with " expected at position %d');
-    else
-        pos = pos + 1;
-    end
-    str = '';
-    while pos <= len
-        while index_esc <= len_esc && esc(index_esc) < pos
-            index_esc = index_esc + 1;
-        end
-        if index_esc > len_esc
-            str = [str inStr(pos:len)];
-            pos = len + 1;
-            break;
-        else
-            str = [str inStr(pos:esc(index_esc)-1)];
-            pos = esc(index_esc);
-        end
-        nstr = length(str); switch inStr(pos)
-            case '"'
-                pos = pos + 1;
-                if(~isempty(str))
-                    if(strcmp(str,'_Inf_'))
-                        str=Inf;
-                    elseif(strcmp(str,'-_Inf_'))
-                        str=-Inf;
-                    elseif(strcmp(str,'_NaN_'))
-                        str=NaN;
-                    end
-                end
-                return;
-            case '\'
-                if pos+1 > len
-                    error_pos('End of file reached right after escape character');
-                end
-                pos = pos + 1;
-                switch inStr(pos)
-                    case {'"' '\' '/'}
-                        str(nstr+1) = inStr(pos);
-                        pos = pos + 1;
-                    case {'b' 'f' 'n' 'r' 't'}
-                        str(nstr+1) = sprintf(['\' inStr(pos)]);
-                        pos = pos + 1;
-                    case 'u'
-                        if pos+4 > len
-                            error_pos('End of file reached in escaped unicode character');
-                        end
-                        str(nstr+(1:6)) = inStr(pos-1:pos+4);
-                        pos = pos + 5;
-                end
-            otherwise % should never happen
-                str(nstr+1) = inStr(pos), keyboard
-                pos = pos + 1;
-        end
-    end
-    error_pos('End of file while expecting end of inStr');
-
-%%-------------------------------------------------------------------------
-
-function num = parse_number(varargin)
-    global pos inStr len isoct
-    currstr=inStr(pos:end);
-    numstr=0;
-    if(isoct~=0)
-        numstr=regexp(currstr,'^\s*-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+\-]?\d+)?','end');
-        [num, one] = sscanf(currstr, '%f', 1);
-        delta=numstr+1;
-    else
-        [num, one, err, delta] = sscanf(currstr, '%f', 1);
-        if ~isempty(err)
-            error_pos('Error reading number at position %d');
-        end
-    end
-    pos = pos + delta-1;
-
-%%-------------------------------------------------------------------------
-
-function val = parse_value(varargin)
-    global pos inStr len
-    % true = 1; false = 0;
-
-    switch(inStr(pos))
-        case '"'
-            val = parseStr(varargin{:});
-            return;
-        case '['
-            val = parse_array(varargin{:});
-            return;
-        case '{'
-            val = parse_object(varargin{:});
-            if isstruct(val)
-                if(~isempty(strmatch('x0x5F_ArrayType_',fieldnames(val), 'exact')))
-                    val=jstruct2array(val);
-                end
-            elseif isempty(val)
-                val = struct;
-            end
-            return;
-        case {'-','0','1','2','3','4','5','6','7','8','9'}
-            val = parse_number(varargin{:});
-            return;
-        case 't'
-            if pos+3 <= len && strcmpi(inStr(pos:pos+3), 'true')
-                val = true;
-                pos = pos + 4;
-                return;
-            end
-        case 'f'
-            if pos+4 <= len && strcmpi(inStr(pos:pos+4), 'false')
-                val = false;
-                pos = pos + 5;
-                return;
-            end
-        case 'n'
-            if pos+3 <= len && strcmpi(inStr(pos:pos+3), 'null')
-                val = NaN;
-                pos = pos + 4;
-                return;
-            end
-    end
-    error_pos('Value expected at position %d');
-%%-------------------------------------------------------------------------
-
-function error_pos(msg)
-    global pos inStr len
-    poShow = max(min([pos-15 pos-1 pos pos+20],len),1);
-    if poShow(3) == poShow(2)
-        poShow(3:4) = poShow(2)+[0 -1];  % display nothing after
-    end
-    msg = [sprintf(msg, pos) ': ' ...
-    inStr(poShow(1):poShow(2)) '<error>' inStr(poShow(3):poShow(4)) ];
-    error( ['JSONparser:invalidFormat: ' msg] );
-
-%%-------------------------------------------------------------------------
-
-function str = valid_field(str)
-global isoct
-% From MATLAB doc: field names must begin with a letter, which may be
-% followed by any combination of letters, digits, and underscores.
-% Invalid characters will be converted to underscores, and the prefix
-% "x0x[Hex code]_" will be added if the first character is not a letter.
-    pos=regexp(str,'^[^A-Za-z]','once');
-    if(~isempty(pos))
-        if(~isoct)
-            str=regexprep(str,'^([^A-Za-z])','x0x${sprintf(''%X'',unicode2native($1))}_','once');
-        else
-            str=sprintf('x0x%X_%s',char(str(1)),str(2:end));
-        end
-    end
-    if(isempty(regexp(str,'[^0-9A-Za-z_]', 'once' ))) return;  end
-    if(~isoct)
-        str=regexprep(str,'([^0-9A-Za-z_])','_0x${sprintf(''%X'',unicode2native($1))}_');
-    else
-        pos=regexp(str,'[^0-9A-Za-z_]');
-        if(isempty(pos)) return; end
-        str0=str;
-        pos0=[0 pos(:)' length(str)];
-        str='';
-        for i=1:length(pos)
-            str=[str str0(pos0(i)+1:pos(i)-1) sprintf('_0x%X_',str0(pos(i)))];
-        end
-        if(pos(end)~=length(str))
-            str=[str str0(pos0(end-1)+1:pos0(end))];
-        end
-    end
-    %str(~isletter(str) & ~('0' <= str & str <= '9')) = '_';
-
-%%-------------------------------------------------------------------------
-function endpos = matching_quote(str,pos)
-len=length(str);
-while(pos<len)
-    if(str(pos)=='"')
-        if(~(pos>1 && str(pos-1)=='\'))
-            endpos=pos;
-            return;
-        end        
-    end
-    pos=pos+1;
-end
-error('unmatched quotation mark');
-%%-------------------------------------------------------------------------
-function [endpos e1l e1r maxlevel] = matching_bracket(str,pos)
-global arraytoken
-level=1;
-maxlevel=level;
-endpos=0;
-bpos=arraytoken(arraytoken>=pos);
-tokens=str(bpos);
-len=length(tokens);
-pos=1;
-e1l=[];
-e1r=[];
-while(pos<=len)
-    c=tokens(pos);
-    if(c==']')
-        level=level-1;
-        if(isempty(e1r)) e1r=bpos(pos); end
-        if(level==0)
-            endpos=bpos(pos);
-            return
-        end
-    end
-    if(c=='[')
-        if(isempty(e1l)) e1l=bpos(pos); end
-        level=level+1;
-        maxlevel=max(maxlevel,level);
-    end
-    if(c=='"')
-        pos=matching_quote(tokens,pos+1);
-    end
-    pos=pos+1;
-end
-if(endpos==0) 
-    error('unmatched "]"');
-end
-
diff --git a/plotly/plotly_aux/jsonlab/loadubjson.m b/plotly/plotly_aux/jsonlab/loadubjson.m
deleted file mode 100755
index 2e48c581..00000000
--- a/plotly/plotly_aux/jsonlab/loadubjson.m
+++ /dev/null
@@ -1,498 +0,0 @@
-function data = loadubjson(fname,varargin)
-%
-% data=loadubjson(fname,opt)
-%    or
-% data=loadubjson(fname,'param1',value1,'param2',value2,...)
-%
-% parse a JSON (JavaScript Object Notation) file or string
-%
-% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-%            date: 2013/08/01
-%
-% $Id: loadubjson.m 417 2014-01-21 22:34:49Z fangq $
-%
-% input:
-%      fname: input file name, if fname contains "{}" or "[]", fname
-%             will be interpreted as a UBJSON string
-%      opt: a struct to store parsing options, opt can be replaced by 
-%           a list of ('param',value) pairs. The param string is equivallent
-%           to a field in opt.
-%
-% output:
-%      dat: a cell array, where {...} blocks are converted into cell arrays,
-%           and [...] are converted to arrays
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details 
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-global pos inStr len  esc index_esc len_esc isoct arraytoken
-
-if(regexp(fname,'[\{\}\]\[]','once'))
-   string=fname;
-elseif(exist(fname,'file'))
-   fid = fopen(fname,'rb');
-   string = fread(fid,inf,'uint8=>char')';
-   fclose(fid);
-else
-   error('input file does not exist');
-end
-
-pos = 1; len = length(string); inStr = string;
-isoct=exist('OCTAVE_VERSION');
-arraytoken=find(inStr=='[' | inStr==']' | inStr=='"');
-jstr=regexprep(inStr,'\\\\','  ');
-escquote=regexp(jstr,'\\"');
-arraytoken=sort([arraytoken escquote]);
-
-% String delimiters and escape chars identified to improve speed:
-esc = find(inStr=='"' | inStr=='\' ); % comparable to: regexp(inStr, '["\\]');
-index_esc = 1; len_esc = length(esc);
-
-opt=varargin2struct(varargin{:});
-jsoncount=1;
-while pos <= len
-    switch(next_char)
-        case '{'
-            data{jsoncount} = parse_object(opt);
-        case '['
-            data{jsoncount} = parse_array(opt);
-        otherwise
-            error_pos('Outer level structure must be an object or an array');
-    end
-    jsoncount=jsoncount+1;
-end % while
-
-jsoncount=length(data);
-if(jsoncount==1 && iscell(data))
-    data=data{1};
-end
-
-if(~isempty(data))
-      if(isstruct(data)) % data can be a struct array
-          data=jstruct2array(data);
-      elseif(iscell(data))
-          data=jcell2array(data);
-      end
-end
-
-
-%%
-function newdata=parse_collection(id,data,obj)
-
-if(jsoncount>0 && exist('data','var')) 
-    if(~iscell(data))
-       newdata=cell(1);
-       newdata{1}=data;
-       data=newdata;
-    end
-end
-
-%%
-function newdata=jcell2array(data)
-len=length(data);
-newdata=data;
-for i=1:len
-      if(isstruct(data{i}))
-          newdata{i}=jstruct2array(data{i});
-      elseif(iscell(data{i}))
-          newdata{i}=jcell2array(data{i});
-      end
-end
-
-%%-------------------------------------------------------------------------
-function newdata=jstruct2array(data)
-fn=fieldnames(data);
-newdata=data;
-len=length(data);
-for i=1:length(fn) % depth-first
-    for j=1:len
-        if(isstruct(getfield(data(j),fn{i})))
-            newdata(j)=setfield(newdata(j),fn{i},jstruct2array(getfield(data(j),fn{i})));
-        end
-    end
-end
-if(~isempty(strmatch('x0x5F_ArrayType_',fn)) && ~isempty(strmatch('x0x5F_ArrayData_',fn)))
-  newdata=cell(len,1);
-  for j=1:len
-    ndata=cast(data(j).x0x5F_ArrayData_,data(j).x0x5F_ArrayType_);
-    iscpx=0;
-    if(~isempty(strmatch('x0x5F_ArrayIsComplex_',fn)))
-        if(data(j).x0x5F_ArrayIsComplex_)
-           iscpx=1;
-        end
-    end
-    if(~isempty(strmatch('x0x5F_ArrayIsSparse_',fn)))
-        if(data(j).x0x5F_ArrayIsSparse_)
-            if(~isempty(strmatch('x0x5F_ArraySize_',fn)))
-                dim=double(data(j).x0x5F_ArraySize_);
-                if(iscpx && size(ndata,2)==4-any(dim==1))
-                    ndata(:,end-1)=complex(ndata(:,end-1),ndata(:,end));
-                end
-                if isempty(ndata)
-                    % All-zeros sparse
-                    ndata=sparse(dim(1),prod(dim(2:end)));
-                elseif dim(1)==1
-                    % Sparse row vector
-                    ndata=sparse(1,ndata(:,1),ndata(:,2),dim(1),prod(dim(2:end)));
-                elseif dim(2)==1
-                    % Sparse column vector
-                    ndata=sparse(ndata(:,1),1,ndata(:,2),dim(1),prod(dim(2:end)));
-                else
-                    % Generic sparse array.
-                    ndata=sparse(ndata(:,1),ndata(:,2),ndata(:,3),dim(1),prod(dim(2:end)));
-                end
-            else
-                if(iscpx && size(ndata,2)==4)
-                    ndata(:,3)=complex(ndata(:,3),ndata(:,4));
-                end
-                ndata=sparse(ndata(:,1),ndata(:,2),ndata(:,3));
-            end
-        end
-    elseif(~isempty(strmatch('x0x5F_ArraySize_',fn)))
-        if(iscpx && size(ndata,2)==2)
-             ndata=complex(ndata(:,1),ndata(:,2));
-        end
-        ndata=reshape(ndata(:),data(j).x0x5F_ArraySize_);
-    end
-    newdata{j}=ndata;
-  end
-  if(len==1)
-      newdata=newdata{1};
-  end
-end
-
-%%-------------------------------------------------------------------------
-function object = parse_object(varargin)
-    parse_char('{');
-    object = [];
-    type='';
-    count=-1;
-    if(next_char == '$')
-        type=inStr(pos+1); % TODO
-        pos=pos+2;
-    end
-    if(next_char == '#')
-        pos=pos+1;
-        count=double(parse_number());
-    end
-    if next_char ~= '}'
-        num=0;
-        while 1
-            str = parseStr(varargin{:});
-            if isempty(str)
-                error_pos('Name of value at position %d cannot be empty');
-            end
-            %parse_char(':');
-            val = parse_value(varargin{:});
-            num=num+1;
-            eval( sprintf( 'object.%s  = val;', valid_field(str) ) );
-            if next_char == '}' || (count>=0 && num>=count)
-                break;
-            end
-            %parse_char(',');
-        end
-    end
-    if(count==-1)
-        parse_char('}');
-    end
-
-%%-------------------------------------------------------------------------
-function [cid,len]=elem_info(type)
-id=strfind('iUIlLdD',type);
-dataclass={'int8','uint8','int16','int32','int64','single','double'};
-bytelen=[1,1,2,4,8,4,8];
-if(id>0)
-    cid=dataclass{id};
-    len=bytelen(id);
-else
-    error_pos('unsupported type at position %d');
-end
-%%-------------------------------------------------------------------------
-
-
-function [data adv]=parse_block(type,count,varargin)
-global pos inStr isoct
-[cid,len]=elem_info(type);
-if(isoct)
-    data=typecast(int8(inStr(pos:pos+len*count-1)),cid);
-else
-    data=typecast(uint8(inStr(pos:pos+len*count-1)),cid);
-end
-adv=double(len*count);
-
-%%-------------------------------------------------------------------------
-
-
-function object = parse_array(varargin) % JSON array is written in row-major order
-global pos inStr isoct
-    parse_char('[');
-    object = cell(0, 1);
-    dim=[];
-    type='';
-    count=-1;
-    if(next_char == '$')
-        type=inStr(pos+1);
-        pos=pos+2;
-    end
-    if(next_char == '#')
-        pos=pos+1;
-        if(next_char=='[')
-            dim=parse_array(varargin{:});
-            count=prod(double(dim));
-        else
-            count=double(parse_number());
-        end
-    end
-    if(~isempty(type))
-        if(count>=0)
-            [object adv]=parse_block(type,count,varargin{:});
-            if(~isempty(dim))
-                object=reshape(object,dim);
-            end
-            pos=pos+adv;
-            return;
-        else
-            endpos=matching_bracket(inStr,pos);
-            [cid,len]=elem_info(type);
-            count=(endpos-pos)/len;
-            [object adv]=parse_block(type,count,varargin{:});
-            pos=pos+adv;
-            parse_char(']');
-            return;
-        end
-    end
-    if next_char ~= ']'
-         while 1
-            val = parse_value(varargin{:});
-            object{end+1} = val;
-            if next_char == ']'
-                break;
-            end
-            %parse_char(',');
-         end
-    end
-    if(jsonopt('SimplifyCell',0,varargin{:})==1)
-      try
-        oldobj=object;
-        object=cell2mat(object')';
-        if(iscell(oldobj) && isstruct(object) && numel(object)>1 && jsonopt('SimplifyCellArray',1,varargin{:})==0)
-            object=oldobj;
-        elseif(size(object,1)>1 && ndims(object)==2)
-            object=object';
-        end
-      catch
-      end
-    end
-    if(count==-1)
-        parse_char(']');
-    end
-
-%%-------------------------------------------------------------------------
-
-function parse_char(c)
-    global pos inStr len
-    skip_whitespace;
-    if pos > len || inStr(pos) ~= c
-        error_pos(sprintf('Expected %c at position %%d', c));
-    else
-        pos = pos + 1;
-        skip_whitespace;
-    end
-
-%%-------------------------------------------------------------------------
-
-function c = next_char
-    global pos inStr len
-    skip_whitespace;
-    if pos > len
-        c = [];
-    else
-        c = inStr(pos);
-    end
-
-%%-------------------------------------------------------------------------
-
-function skip_whitespace
-    global pos inStr len
-    while pos <= len && isspace(inStr(pos))
-        pos = pos + 1;
-    end
-
-%%-------------------------------------------------------------------------
-function str = parseStr(varargin)
-    global pos inStr esc index_esc len_esc
- % len, ns = length(inStr), keyboard
-    type=inStr(pos);
-    if type ~= 'S' && type ~= 'C' && type ~= 'H'
-        error_pos('String starting with S expected at position %d');
-    else
-        pos = pos + 1;
-    end
-    if(type == 'C')
-        str=inStr(pos);
-        pos=pos+1;
-        return;
-    end
-    bytelen=double(parse_number());
-    if(length(inStr)>=pos+bytelen-1)
-        str=inStr(pos:pos+bytelen-1);
-        pos=pos+bytelen;
-    else
-        error_pos('End of file while expecting end of inStr');
-    end
-
-%%-------------------------------------------------------------------------
-
-function num = parse_number(varargin)
-    global pos inStr len isoct
-    id=strfind('iUIlLdD',inStr(pos));
-    if(isempty(id))
-        error_pos('expecting a number at position %d');
-    end
-    type={'int8','uint8','int16','int32','int64','single','double'};
-    bytelen=[1,1,2,4,8,4,8];
-    if(isoct)
-        num=typecast(int8(inStr(pos+1:pos+bytelen(id))),type{id});
-    else
-        num=typecast(uint8(inStr(pos+1:pos+bytelen(id))),type{id});
-    end
-    pos = pos + bytelen(id)+1;
-
-%%-------------------------------------------------------------------------
-
-function val = parse_value(varargin)
-    global pos inStr len
-    true = 1; false = 0;
-
-    switch(inStr(pos))
-        case {'S','C','H'}
-            val = parseStr(varargin{:});
-            return;
-        case '['
-            val = parse_array(varargin{:});
-            return;
-        case '{'
-            val = parse_object(varargin{:});
-            if isstruct(val)
-                if(~isempty(strmatch('x0x5F_ArrayType_',fieldnames(val), 'exact')))
-                    val=jstruct2array(val);
-                end
-            elseif isempty(val)
-                val = struct;
-            end
-            return;
-        case {'i','U','I','l','L','d','D'}
-            val = parse_number(varargin{:});
-            return;
-        case 'T'
-            val = true;
-            pos = pos + 1;
-            return;
-        case 'F'
-            val = false;
-            pos = pos + 1;
-            return;
-        case {'Z','N'}
-            val = [];
-            pos = pos + 1;
-            return;
-    end
-    error_pos('Value expected at position %d');
-%%-------------------------------------------------------------------------
-
-function error_pos(msg)
-    global pos inStr len
-    poShow = max(min([pos-15 pos-1 pos pos+20],len),1);
-    if poShow(3) == poShow(2)
-        poShow(3:4) = poShow(2)+[0 -1];  % display nothing after
-    end
-    msg = [sprintf(msg, pos) ': ' ...
-    inStr(poShow(1):poShow(2)) '<error>' inStr(poShow(3):poShow(4)) ];
-    error( ['JSONparser:invalidFormat: ' msg] );
-
-%%-------------------------------------------------------------------------
-
-function str = valid_field(str)
-global isoct
-% From MATLAB doc: field names must begin with a letter, which may be
-% followed by any combination of letters, digits, and underscores.
-% Invalid characters will be converted to underscores, and the prefix
-% "x0x[Hex code]_" will be added if the first character is not a letter.
-    pos=regexp(str,'^[^A-Za-z]','once');
-    if(~isempty(pos))
-        if(~isoct)
-            str=regexprep(str,'^([^A-Za-z])','x0x${sprintf(''%X'',unicode2native($1))}_','once');
-        else
-            str=sprintf('x0x%X_%s',char(str(1)),str(2:end));
-        end
-    end
-    if(isempty(regexp(str,'[^0-9A-Za-z_]', 'once' ))) return;  end
-    if(~isoct)
-        str=regexprep(str,'([^0-9A-Za-z_])','_0x${sprintf(''%X'',unicode2native($1))}_');
-    else
-        pos=regexp(str,'[^0-9A-Za-z_]');
-        if(isempty(pos)) return; end
-        str0=str;
-        pos0=[0 pos(:)' length(str)];
-        str='';
-        for i=1:length(pos)
-            str=[str str0(pos0(i)+1:pos(i)-1) sprintf('_0x%X_',str0(pos(i)))];
-        end
-        if(pos(end)~=length(str))
-            str=[str str0(pos0(end-1)+1:pos0(end))];
-        end
-    end
-    %str(~isletter(str) & ~('0' <= str & str <= '9')) = '_';
-
-%%-------------------------------------------------------------------------
-function endpos = matching_quote(str,pos)
-len=length(str);
-while(pos<len)
-    if(str(pos)=='"')
-        if(~(pos>1 && str(pos-1)=='\'))
-            endpos=pos;
-            return;
-        end        
-    end
-    pos=pos+1;
-end
-error('unmatched quotation mark');
-%%-------------------------------------------------------------------------
-function [endpos e1l e1r maxlevel] = matching_bracket(str,pos)
-global arraytoken
-level=1;
-maxlevel=level;
-endpos=0;
-bpos=arraytoken(arraytoken>=pos);
-tokens=str(bpos);
-len=length(tokens);
-pos=1;
-e1l=[];
-e1r=[];
-while(pos<=len)
-    c=tokens(pos);
-    if(c==']')
-        level=level-1;
-        if(isempty(e1r)) e1r=bpos(pos); end
-        if(level==0)
-            endpos=bpos(pos);
-            return
-        end
-    end
-    if(c=='[')
-        if(isempty(e1l)) e1l=bpos(pos); end
-        level=level+1;
-        maxlevel=max(maxlevel,level);
-    end
-    if(c=='"')
-        pos=matching_quote(tokens,pos+1);
-    end
-    pos=pos+1;
-end
-if(endpos==0) 
-    error('unmatched "]"');
-end
-
diff --git a/plotly/plotly_aux/jsonlab/mergestruct.m b/plotly/plotly_aux/jsonlab/mergestruct.m
deleted file mode 100755
index f044866e..00000000
--- a/plotly/plotly_aux/jsonlab/mergestruct.m
+++ /dev/null
@@ -1,33 +0,0 @@
-function s=mergestruct(s1,s2)
-%
-% s=mergestruct(s1,s2)
-%
-% merge two struct objects into one
-%
-% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-% date: 2012/12/22
-%
-% input:
-%      s1,s2: a struct object, s1 and s2 can not be arrays
-%
-% output:
-%      s: the merged struct object. fields in s1 and s2 will be combined in s.
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details 
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-if(~isstruct(s1) || ~isstruct(s2))
-    error('input parameters contain non-struct');
-end
-if(length(s1)>1 || length(s2)>1)
-    error('can not merge struct arrays');
-end
-fn=fieldnames(s2);
-s=s1;
-for i=1:length(fn)              
-    s=setfield(s,fn{i},getfield(s2,fn{i}));
-end
-
diff --git a/plotly/plotly_aux/jsonlab/savejson.m b/plotly/plotly_aux/jsonlab/savejson.m
deleted file mode 100755
index 0a6b7da9..00000000
--- a/plotly/plotly_aux/jsonlab/savejson.m
+++ /dev/null
@@ -1,385 +0,0 @@
-function json=savejson(rootname,obj,varargin)
-%
-% json=savejson(rootname,obj,filename)
-%    or
-% json=savejson(rootname,obj,opt)
-% json=savejson(rootname,obj,'param1',value1,'param2',value2,...)
-%
-% convert a MATLAB object (cell, struct or array) into a JSON (JavaScript
-% Object Notation) string
-%
-% author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-%            created on 2011/09/09
-%
-% $Id: savejson.m 415 2013-10-07 16:38:31Z fangq $
-%
-% input:
-%      rootname: name of the root-object, if set to '', will use variable name
-%      obj: a MATLAB object (array, cell, cell array, struct, struct array)
-%      filename: a string for the file name to save the output JSON data
-%      opt: a struct for additional options, use [] if all use default
-%        opt can have the following fields (first in [.|.] is the default)
-%
-%        opt.FileName [''|string]: a file name to save the output JSON data
-%        opt.FloatFormat ['%.10g'|string]: format to show each numeric element
-%                         of a 1D/2D array;
-%        opt.ArrayIndent [1|0]: if 1, output explicit data array with
-%                         precedent indentation; if 0, no indentation
-%        opt.ArrayToStruct[0|1]: when set to 0, savejson outputs 1D/2D
-%                         array in JSON array format; if sets to 1, an
-%                         array will be shown as a struct with fields
-%                         "_ArrayType_", "_ArraySize_" and "_ArrayData_"; for
-%                         sparse arrays, the non-zero elements will be
-%                         saved to _ArrayData_ field in triplet-format i.e.
-%                         (ix,iy,val) and "_ArrayIsSparse_" will be added
-%                         with a value of 1; for a complex array, the 
-%                         _ArrayData_ array will include two columns 
-%                         (4 for sparse) to record the real and imaginary 
-%                         parts, and also "_ArrayIsComplex_":1 is added. 
-%        opt.ParseLogical [0|1]: if this is set to 1, logical array elem
-%                         will use true/false rather than 1/0.
-%        opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single
-%                         numerical element will be shown without a square
-%                         bracket, unless it is the root object; if 0, square
-%                         brackets are forced for any numerical arrays.
-%        opt.ForceRootName [0|1]: when set to 1 and rootname is empty, savejson
-%                         will use the name of the passed obj variable as the 
-%                         root object name; if obj is an expression and 
-%                         does not have a name, 'root' will be used; if this 
-%                         is set to 0 and rootname is empty, the root level 
-%                         will be merged down to the lower level.
-%        opt.Inf ['"$1_Inf_"'|string]: a customized regular expression pattern
-%                         to represent +/-Inf. The matched pattern is '([-+]*)Inf'
-%                         and $1 represents the sign. For those who want to use
-%                         1e999 to represent Inf, they can set opt.Inf to '$11e999'
-%        opt.NaN ['"_NaN_"'|string]: a customized regular expression pattern
-%                         to represent NaN
-%        opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),
-%                         for example, if opt.JSON='foo', the JSON data is
-%                         wrapped inside a function call as 'foo(...);'
-%        opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson 
-%                         back to the string form
-%        opt can be replaced by a list of ('param',value) pairs. The param 
-%        string is equivallent to a field in opt.
-% output:
-%      json: a string in the JSON format (see http://json.org)
-%
-% examples:
-%      a=struct('node',[1  9  10; 2 1 1.2], 'elem',[9 1;1 2;2 3],...
-%           'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ');
-%      savejson('mesh',a)
-%      savejson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g')
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-if(nargin==1)
-   varname=inputname(1);
-   obj=rootname;
-   if(isempty(varname)) 
-      varname='root';
-   end
-   rootname=varname;
-else
-   varname=inputname(2);
-end
-if(length(varargin)==1 && ischar(varargin{1}))
-   opt=struct('FileName',varargin{1});
-else
-   opt=varargin2struct(varargin{:});
-end
-opt.IsOctave=exist('OCTAVE_VERSION');
-rootisarray=0;
-rootlevel=1;
-forceroot=jsonopt('ForceRootName',0,opt);
-if((isnumeric(obj) || islogical(obj) || ischar(obj) || isstruct(obj) || iscell(obj)) && isempty(rootname) && forceroot==0)
-    rootisarray=1;
-    rootlevel=0;
-else
-    if(isempty(rootname))
-        rootname=varname;
-    end
-end
-if((isstruct(obj) || iscell(obj))&& isempty(rootname) && forceroot)
-    rootname='root';
-end
-json=obj2json(rootname,obj,rootlevel,opt);
-if(rootisarray)
-    json=sprintf('%s\n',json);
-else
-    json=sprintf('{\n%s\n}\n',json);
-end
-
-jsonp=jsonopt('JSONP','',opt);
-if(~isempty(jsonp))
-    json=sprintf('%s(%s);\n',jsonp,json);
-end
-
-% save to a file if FileName is set, suggested by Patrick Rapin
-if(~isempty(jsonopt('FileName','',opt)))
-    fid = fopen(opt.FileName, 'wt');
-    fwrite(fid,json,'char');
-    fclose(fid);
-end
-
-%%-------------------------------------------------------------------------
-function txt=obj2json(name,item,level,varargin)
-
-if(iscell(item))
-    txt=cell2json(name,item,level,varargin{:});
-elseif(isstruct(item))
-    txt=struct2json(name,item,level,varargin{:});
-elseif(ischar(item))
-    txt=str2json(name,item,level,varargin{:});
-else
-    txt=mat2json(name,item,level,varargin{:});
-end
-
-%%-------------------------------------------------------------------------
-function txt=cell2json(name,item,level,varargin)
-txt='';
-if(~iscell(item))
-        error('input is not a cell');
-end
-
-dim=size(item);
-len=numel(item); % let's handle 1D cell first
-padding1=repmat(sprintf('\t'),1,level-1);
-padding0=repmat(sprintf('\t'),1,level);
-if(len>1) 
-    if(~isempty(name))
-        txt=sprintf('%s"%s": [\n',padding0, checkname(name,varargin{:})); name=''; 
-    else
-        txt=sprintf('%s[\n',padding0); 
-    end
-elseif(len==0)
-    if(~isempty(name))
-        txt=sprintf('%s"%s": []',padding0, checkname(name,varargin{:})); name=''; 
-    else
-        txt=sprintf('%s[]',padding0); 
-    end
-end
-for i=1:len
-    txt=sprintf('%s%s%s',txt,padding1,obj2json(name,item{i},level+(len>1),varargin{:}));
-    if(i<len) txt=sprintf('%s%s',txt,sprintf(',\n')); end
-end
-if(len>1) txt=sprintf('%s\n%s]',txt,padding0); end
-
-%%-------------------------------------------------------------------------
-function txt=struct2json(name,item,level,varargin)
-txt='';
-if(~isstruct(item))
-	error('input is not a struct');
-end
-len=numel(item);
-padding1=repmat(sprintf('\t'),1,level-1);
-padding0=repmat(sprintf('\t'),1,level);
-sep=',';
-
-if(~isempty(name)) 
-    if(len>1) txt=sprintf('%s"%s": [\n',padding0,checkname(name,varargin{:})); end
-else
-    if(len>1) txt=sprintf('%s[\n',padding0); end
-end
-for e=1:len
-  names = fieldnames(item(e));
-  if(~isempty(name) && len==1)
-        txt=sprintf('%s%s"%s": {\n',txt,repmat(sprintf('\t'),1,level+(len>1)), checkname(name,varargin{:})); 
-  else
-        txt=sprintf('%s%s{\n',txt,repmat(sprintf('\t'),1,level+(len>1))); 
-  end
-  if(~isempty(names))
-    for i=1:length(names)
-	txt=sprintf('%s%s',txt,obj2json(names{i},getfield(item(e),...
-             names{i}),level+1+(len>1),varargin{:}));
-        if(i<length(names)) txt=sprintf('%s%s',txt,','); end
-        txt=sprintf('%s%s',txt,sprintf('\n'));
-    end
-  end
-  txt=sprintf('%s%s}',txt,repmat(sprintf('\t'),1,level+(len>1)));
-  if(e==len) sep=''; end
-  if(e<len) txt=sprintf('%s%s',txt,sprintf(',\n')); end
-end
-if(len>1) txt=sprintf('%s\n%s]',txt,padding0); end
-
-%%-------------------------------------------------------------------------
-function txt=str2json(name,item,level,varargin)
-txt='';
-if(~ischar(item))
-        error('input is not a string');
-end
-item=reshape(item, max(size(item),[1 0]));
-len=size(item,1);
-sep=sprintf(',\n');
-
-padding1=repmat(sprintf('\t'),1,level);
-padding0=repmat(sprintf('\t'),1,level+1);
-
-if(~isempty(name)) 
-    if(len>1) txt=sprintf('%s"%s": [\n',padding1,checkname(name,varargin{:})); end
-else
-    if(len>1) txt=sprintf('%s[\n',padding1); end
-end
-isoct=jsonopt('IsOctave',0,varargin{:});
-for e=1:len
-    if(isoct)
-        val=regexprep(item(e,:),'\\','\\');
-        val=regexprep(val,'"','\"');
-        val=regexprep(val,'^"','\"');
-    else
-        val=regexprep(item(e,:),'\\','\\\\');
-        val=regexprep(val,'"','\\"');
-        val=regexprep(val,'^"','\\"');
-    end
-    if(len==1)
-        obj=['"' checkname(name,varargin{:}) '": ' '"',val,'"'];
-	if(isempty(name)) obj=['"',val,'"']; end
-        txt=sprintf('%s%s%s%s',txt,repmat(sprintf('\t'),1,level),obj);
-    else
-        txt=sprintf('%s%s%s%s',txt,repmat(sprintf('\t'),1,level+1),['"',val,'"']);
-    end
-    if(e==len) sep=''; end
-    txt=sprintf('%s%s',txt,sep);
-end
-if(len>1) txt=sprintf('%s\n%s%s',txt,padding1,']'); end
-
-%%-------------------------------------------------------------------------
-function txt=mat2json(name,item,level,varargin)
-if(~isnumeric(item) && ~islogical(item))
-        error('input is not an array');
-end
-
-padding1=repmat(sprintf('\t'),1,level);
-padding0=repmat(sprintf('\t'),1,level+1);
-
-if(length(size(item))>2 || issparse(item) || ~isreal(item) || ...
-   isempty(item) ||jsonopt('ArrayToStruct',0,varargin{:}))
-    if(isempty(name))
-    	txt=sprintf('%s{\n%s"_ArrayType_": "%s",\n%s"_ArraySize_": %s,\n',...
-              padding1,padding0,class(item),padding0,regexprep(mat2str(size(item)),'\s+',',') );
-    else
-    	txt=sprintf('%s"%s": {\n%s"_ArrayType_": "%s",\n%s"_ArraySize_": %s,\n',...
-              padding1,checkname(name,varargin{:}),padding0,class(item),padding0,regexprep(mat2str(size(item)),'\s+',',') );
-    end
-else
-    if(isempty(name))
-    	txt=sprintf('%s%s',padding1,matdata2json(item,level+1,varargin{:}));
-    else
-        if(numel(item)==1 && jsonopt('NoRowBracket',1,varargin{:})==1)
-            numtxt=regexprep(regexprep(matdata2json(item,level+1,varargin{:}),'^\[',''),']','');
-           	txt=sprintf('%s"%s": %s',padding1,checkname(name,varargin{:}),numtxt);
-        else
-    	    txt=sprintf('%s"%s": %s',padding1,checkname(name,varargin{:}),matdata2json(item,level+1,varargin{:}));
-        end
-    end
-    return;
-end
-dataformat='%s%s%s%s%s';
-
-if(issparse(item))
-    [ix,iy]=find(item);
-    data=full(item(find(item)));
-    if(~isreal(item))
-       data=[real(data(:)),imag(data(:))];
-       if(size(item,1)==1)
-           % Kludge to have data's 'transposedness' match item's.
-           % (Necessary for complex row vector handling below.)
-           data=data';
-       end
-       txt=sprintf(dataformat,txt,padding0,'"_ArrayIsComplex_": ','1', sprintf(',\n'));
-    end
-    txt=sprintf(dataformat,txt,padding0,'"_ArrayIsSparse_": ','1', sprintf(',\n'));
-    if(size(item,1)==1)
-        % Row vector, store only column indices.
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayData_": ',...
-           matdata2json([iy(:),data'],level+2,varargin{:}), sprintf('\n'));
-    elseif(size(item,2)==1)
-        % Column vector, store only row indices.
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayData_": ',...
-           matdata2json([ix,data],level+2,varargin{:}), sprintf('\n'));
-    else
-        % General case, store row and column indices.
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayData_": ',...
-           matdata2json([ix,iy,data],level+2,varargin{:}), sprintf('\n'));
-    end
-else
-    if(isreal(item))
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayData_": ',...
-            matdata2json(item(:)',level+2,varargin{:}), sprintf('\n'));
-    else
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayIsComplex_": ','1', sprintf(',\n'));
-        txt=sprintf(dataformat,txt,padding0,'"_ArrayData_": ',...
-            matdata2json([real(item(:)) imag(item(:))],level+2,varargin{:}), sprintf('\n'));
-    end
-end
-txt=sprintf('%s%s%s',txt,padding1,'}');
-
-%%-------------------------------------------------------------------------
-function txt=matdata2json(mat,level,varargin)
-if(size(mat,1)==1)
-    pre='';
-    post='';
-    level=level-1;
-else
-    pre=sprintf('[\n');
-    post=sprintf('\n%s]',repmat(sprintf('\t'),1,level-1));
-end
-if(isempty(mat))
-    txt='null';
-    return;
-end
-floatformat=jsonopt('FloatFormat','%.10g',varargin{:});
-formatstr=['[' repmat([floatformat ','],1,size(mat,2)-1) [floatformat sprintf('],\n')]];
-
-if(nargin>=2 && size(mat,1)>1 && jsonopt('ArrayIndent',1,varargin{:})==1)
-    formatstr=[repmat(sprintf('\t'),1,level) formatstr];
-end
-txt=sprintf(formatstr,mat');
-txt(end-1:end)=[];
-if(islogical(mat) && jsonopt('ParseLogical',0,varargin{:})==1)
-   txt=regexprep(txt,'1','true');
-   txt=regexprep(txt,'0','false');
-end
-%txt=regexprep(mat2str(mat),'\s+',',');
-%txt=regexprep(txt,';',sprintf('],\n['));
-% if(nargin>=2 && size(mat,1)>1)
-%     txt=regexprep(txt,'\[',[repmat(sprintf('\t'),1,level) '[']);
-% end
-txt=[pre txt post];
-if(any(isinf(mat(:))))
-    txt=regexprep(txt,'([-+]*)Inf',jsonopt('Inf','"$1_Inf_"',varargin{:}));
-end
-if(any(isnan(mat(:))))
-    txt=regexprep(txt,'NaN',jsonopt('NaN','"_NaN_"',varargin{:}));
-end
-
-%%-------------------------------------------------------------------------
-function newname=checkname(name,varargin)
-isunpack=jsonopt('UnpackHex',1,varargin{:});
-newname=name;
-if(isempty(regexp(name,'0x([0-9a-fA-F]+)_','once')))
-    return
-end
-if(isunpack)
-    isoct=jsonopt('IsOctave',0,varargin{:});
-    if(~isoct)
-        newname=regexprep(name,'(^x|_){1}0x([0-9a-fA-F]+)_','${native2unicode(hex2dec($2))}');
-    else
-        pos=regexp(name,'(^x|_){1}0x([0-9a-fA-F]+)_','start');
-        pend=regexp(name,'(^x|_){1}0x([0-9a-fA-F]+)_','end');
-        if(isempty(pos)) return; end
-        str0=name;
-        pos0=[0 pend(:)' length(name)];
-        newname='';
-        for i=1:length(pos)
-            newname=[newname str0(pos0(i)+1:pos(i)-1) char(hex2dec(str0(pos(i)+3:pend(i)-1)))];
-        end
-        if(pos(end)~=length(name))
-            newname=[newname str0(pos0(end-1)+1:pos0(end))];
-        end
-    end
-end
-
diff --git a/plotly/plotly_aux/jsonlab/saveubjson.m b/plotly/plotly_aux/jsonlab/saveubjson.m
deleted file mode 100755
index 5242f875..00000000
--- a/plotly/plotly_aux/jsonlab/saveubjson.m
+++ /dev/null
@@ -1,495 +0,0 @@
-function json=saveubjson(rootname,obj,varargin)
-%
-% json=saveubjson(rootname,obj,filename)
-%    or
-% json=saveubjson(rootname,obj,opt)
-% json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)
-%
-% convert a MATLAB object (cell, struct or array) into a Universal 
-% Binary JSON (UBJSON) binary string
-%
-% author: Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-%            created on 2013/08/17
-%
-% $Id: saveubjson.m 417 2014-01-21 22:34:49Z fangq $
-%
-% input:
-%      rootname: name of the root-object, if set to '', will use variable name
-%      obj: a MATLAB object (array, cell, cell array, struct, struct array)
-%      filename: a string for the file name to save the output JSON data
-%      opt: a struct for additional options, use [] if all use default
-%        opt can have the following fields (first in [.|.] is the default)
-%
-%        opt.FileName [''|string]: a file name to save the output JSON data
-%        opt.ArrayToStruct[0|1]: when set to 0, saveubjson outputs 1D/2D
-%                         array in JSON array format; if sets to 1, an
-%                         array will be shown as a struct with fields
-%                         "_ArrayType_", "_ArraySize_" and "_ArrayData_"; for
-%                         sparse arrays, the non-zero elements will be
-%                         saved to _ArrayData_ field in triplet-format i.e.
-%                         (ix,iy,val) and "_ArrayIsSparse_" will be added
-%                         with a value of 1; for a complex array, the 
-%                         _ArrayData_ array will include two columns 
-%                         (4 for sparse) to record the real and imaginary 
-%                         parts, and also "_ArrayIsComplex_":1 is added. 
-%        opt.ParseLogical [1|0]: if this is set to 1, logical array elem
-%                         will use true/false rather than 1/0.
-%        opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single
-%                         numerical element will be shown without a square
-%                         bracket, unless it is the root object; if 0, square
-%                         brackets are forced for any numerical arrays.
-%        opt.ForceRootName [0|1]: when set to 1 and rootname is empty, saveubjson
-%                         will use the name of the passed obj variable as the 
-%                         root object name; if obj is an expression and 
-%                         does not have a name, 'root' will be used; if this 
-%                         is set to 0 and rootname is empty, the root level 
-%                         will be merged down to the lower level.
-%        opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),
-%                         for example, if opt.JSON='foo', the JSON data is
-%                         wrapped inside a function call as 'foo(...);'
-%        opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson 
-%                         back to the string form
-%        opt can be replaced by a list of ('param',value) pairs. The param 
-%        string is equivallent to a field in opt.
-% output:
-%      json: a string in the JSON format (see http://json.org)
-%
-% examples:
-%      a=struct('node',[1  9  10; 2 1 1.2], 'elem',[9 1;1 2;2 3],...
-%           'face',[9 01 2; 1 2 3; NaN,Inf,-Inf], 'author','FangQ');
-%      saveubjson('mesh',a)
-%      saveubjson('',a,'ArrayIndent',0,'FloatFormat','\t%.5g')
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-if(nargin==1)
-   varname=inputname(1);
-   obj=rootname;
-   if(isempty(varname)) 
-      varname='root';
-   end
-   rootname=varname;
-else
-   varname=inputname(2);
-end
-if(length(varargin)==1 && ischar(varargin{1}))
-   opt=struct('FileName',varargin{1});
-else
-   opt=varargin2struct(varargin{:});
-end
-opt.IsOctave=exist('OCTAVE_VERSION');
-rootisarray=0;
-rootlevel=1;
-forceroot=jsonopt('ForceRootName',0,opt);
-if((isnumeric(obj) || islogical(obj) || ischar(obj) || isstruct(obj) || iscell(obj)) && isempty(rootname) && forceroot==0)
-    rootisarray=1;
-    rootlevel=0;
-else
-    if(isempty(rootname))
-        rootname=varname;
-    end
-end
-if((isstruct(obj) || iscell(obj))&& isempty(rootname) && forceroot)
-    rootname='root';
-end
-json=obj2ubjson(rootname,obj,rootlevel,opt);
-if(~rootisarray)
-    json=['{' json '}'];
-end
-
-jsonp=jsonopt('JSONP','',opt);
-if(~isempty(jsonp))
-    json=[jsonp '(' json ')'];
-end
-
-% save to a file if FileName is set, suggested by Patrick Rapin
-if(~isempty(jsonopt('FileName','',opt)))
-    fid = fopen(opt.FileName, 'wb');
-    fwrite(fid,json,'char');
-    fclose(fid);
-end
-
-%%-------------------------------------------------------------------------
-function txt=obj2ubjson(name,item,level,varargin)
-
-if(iscell(item))
-    txt=cell2ubjson(name,item,level,varargin{:});
-elseif(isstruct(item))
-    txt=struct2ubjson(name,item,level,varargin{:});
-elseif(ischar(item))
-    txt=str2ubjson(name,item,level,varargin{:});
-else
-    txt=mat2ubjson(name,item,level,varargin{:});
-end
-
-%%-------------------------------------------------------------------------
-function txt=cell2ubjson(name,item,level,varargin)
-txt='';
-if(~iscell(item))
-        error('input is not a cell');
-end
-
-dim=size(item);
-len=numel(item); % let's handle 1D cell first
-padding1='';
-padding0='';
-if(len>1) 
-    if(~isempty(name))
-        txt=[S_(checkname(name,varargin{:})) '[']; name=''; 
-    else
-        txt='['; 
-    end
-elseif(len==0)
-    if(~isempty(name))
-        txt=[S_(checkname(name,varargin{:})) 'Z']; name=''; 
-    else
-        txt='Z'; 
-    end
-end
-for i=1:len
-    txt=[txt obj2ubjson(name,item{i},level+(len>1),varargin{:})];
-end
-if(len>1) txt=[txt ']']; end
-
-%%-------------------------------------------------------------------------
-function txt=struct2ubjson(name,item,level,varargin)
-txt='';
-if(~isstruct(item))
-	error('input is not a struct');
-end
-len=numel(item);
-padding1='';
-padding0='';
-sep=',';
-
-if(~isempty(name)) 
-    if(len>1) txt=[S_(checkname(name,varargin{:})) '[']; end
-else
-    if(len>1) txt='['; end
-end
-for e=1:len
-  names = fieldnames(item(e));
-  if(~isempty(name) && len==1)
-        txt=[txt S_(checkname(name,varargin{:})) '{']; 
-  else
-        txt=[txt '{']; 
-  end
-  if(~isempty(names))
-    for i=1:length(names)
-	txt=[txt obj2ubjson(names{i},getfield(item(e),...
-             names{i}),level+1+(len>1),varargin{:})];
-    end
-  end
-  txt=[txt '}'];
-  if(e==len) sep=''; end
-end
-if(len>1) txt=[txt ']']; end
-
-%%-------------------------------------------------------------------------
-function txt=str2ubjson(name,item,level,varargin)
-txt='';
-if(~ischar(item))
-        error('input is not a string');
-end
-item=reshape(item, max(size(item),[1 0]));
-len=size(item,1);
-sep='';
-
-padding1='';
-padding0='';
-
-if(~isempty(name)) 
-    if(len>1) txt=[S_(checkname(name,varargin{:})) '[']; end
-else
-    if(len>1) txt='['; end
-end
-isoct=jsonopt('IsOctave',0,varargin{:});
-for e=1:len
-    val=item(e,:);
-    if(len==1)
-        obj=['' S_(checkname(name,varargin{:})) '' '',S_(val),''];
-	if(isempty(name)) obj=['',S_(val),'']; end
-        txt=[txt,'',obj];
-    else
-        txt=[txt,'',['',S_(val),'']];
-    end
-    if(e==len) sep=''; end
-    txt=[txt sep];
-end
-if(len>1) txt=[txt ']']; end
-
-%%-------------------------------------------------------------------------
-function txt=mat2ubjson(name,item,level,varargin)
-if(~isnumeric(item) && ~islogical(item))
-        error('input is not an array');
-end
-
-padding1='';
-padding0='';
-
-if(length(size(item))>2 || issparse(item) || ~isreal(item) || ...
-   isempty(item) || jsonopt('ArrayToStruct',0,varargin{:}))
-      cid=I_(uint32(max(size(item))));
-      if(isempty(name))
-    	txt=['{' S_('_ArrayType_'),S_(class(item)),padding0,S_('_ArraySize_'),I_a(size(item),cid(1)) ];
-      else
-          if(isempty(item))
-              txt=[S_(checkname(name,varargin{:})),'Z'];
-              return;
-          else
-    	      txt=[S_(checkname(name,varargin{:})),'{',S_('_ArrayType_'),S_(class(item)),padding0,S_('_ArraySize_'),I_a(size(item),cid(1))];
-          end
-      end
-else
-    if(isempty(name))
-    	txt=matdata2ubjson(item,level+1,varargin{:});
-    else
-        if(numel(item)==1 && jsonopt('NoRowBracket',1,varargin{:})==1)
-            numtxt=regexprep(regexprep(matdata2ubjson(item,level+1,varargin{:}),'^\[',''),']','');
-           	txt=[S_(checkname(name,varargin{:})) numtxt];
-        else
-    	    txt=[S_(checkname(name,varargin{:})),matdata2ubjson(item,level+1,varargin{:})];
-        end
-    end
-    return;
-end
-dataformat='%s%s%s%s%s';
-
-if(issparse(item))
-    [ix,iy]=find(item);
-    data=full(item(find(item)));
-    if(~isreal(item))
-       data=[real(data(:)),imag(data(:))];
-       if(size(item,1)==1)
-           % Kludge to have data's 'transposedness' match item's.
-           % (Necessary for complex row vector handling below.)
-           data=data';
-       end
-       txt=[txt,S_('_ArrayIsComplex_'),'T'];
-    end
-    txt=[txt,S_('_ArrayIsSparse_'),'T'];
-    if(size(item,1)==1)
-        % Row vector, store only column indices.
-        txt=[txt,S_('_ArrayData_'),...
-           matdata2ubjson([iy(:),data'],level+2,varargin{:})];
-    elseif(size(item,2)==1)
-        % Column vector, store only row indices.
-        txt=[txt,S_('_ArrayData_'),...
-           matdata2ubjson([ix,data],level+2,varargin{:})];
-    else
-        % General case, store row and column indices.
-        txt=[txt,S_('_ArrayData_'),...
-           matdata2ubjson([ix,iy,data],level+2,varargin{:})];
-    end
-else
-    if(isreal(item))
-        txt=[txt,S_('_ArrayData_'),...
-            matdata2ubjson(item(:)',level+2,varargin{:})];
-    else
-        txt=[txt,S_('_ArrayIsComplex_'),'T'];
-        txt=[txt,S_('_ArrayData_'),...
-            matdata2ubjson([real(item(:)) imag(item(:))],level+2,varargin{:})];
-    end
-end
-txt=[txt,'}'];
-
-%%-------------------------------------------------------------------------
-function txt=matdata2ubjson(mat,level,varargin)
-if(isempty(mat))
-    txt='Z';
-    return;
-end
-if(size(mat,1)==1)
-    level=level-1;
-end
-type='';
-hasnegtive=find(mat<0);
-if(isa(mat,'integer') || (isfloat(mat) && all(mod(mat(:),1) == 0)))
-    if(isempty(hasnegtive))
-       if(max(mat(:))<=2^8)
-           type='U';
-       end
-    end
-    if(isempty(type))
-        % todo - need to consider negative ones separately
-        id= histc(abs(max(mat(:))),[0 2^7 2^15 2^31 2^63]);
-        if(isempty(find(id)))
-            error('high-precision data is not yet supported');
-        end
-        key='iIlL';
-	type=key(find(id));
-    end
-    txt=[I_a(mat(:),type,size(mat))];
-elseif(islogical(mat))
-    logicalval='FT';
-    if(numel(mat)==1)
-        txt=logicalval(mat+1);
-    else
-        txt=['[$U#' I_a(size(mat),'l') typecast(uint8(mat(:)'),'uint8')];
-    end
-else
-    if(numel(mat)==1)
-        txt=['[' D_(mat) ']'];
-    else
-        txt=D_a(mat(:),'D',size(mat));
-    end
-end
-
-%txt=regexprep(mat2str(mat),'\s+',',');
-%txt=regexprep(txt,';',sprintf('],['));
-% if(nargin>=2 && size(mat,1)>1)
-%     txt=regexprep(txt,'\[',[repmat(sprintf('\t'),1,level) '[']);
-% end
-if(any(isinf(mat(:))))
-    txt=regexprep(txt,'([-+]*)Inf',jsonopt('Inf','"$1_Inf_"',varargin{:}));
-end
-if(any(isnan(mat(:))))
-    txt=regexprep(txt,'NaN',jsonopt('NaN','"_NaN_"',varargin{:}));
-end
-
-%%-------------------------------------------------------------------------
-function newname=checkname(name,varargin)
-isunpack=jsonopt('UnpackHex',1,varargin{:});
-newname=name;
-if(isempty(regexp(name,'0x([0-9a-fA-F]+)_','once')))
-    return
-end
-if(isunpack)
-    isoct=jsonopt('IsOctave',0,varargin{:});
-    if(~isoct)
-        newname=regexprep(name,'(^x|_){1}0x([0-9a-fA-F]+)_','${native2unicode(hex2dec($2))}');
-    else
-        pos=regexp(name,'(^x|_){1}0x([0-9a-fA-F]+)_','start');
-        pend=regexp(name,'(^x|_){1}0x([0-9a-fA-F]+)_','end');
-        if(isempty(pos)) return; end
-        str0=name;
-        pos0=[0 pend(:)' length(name)];
-        newname='';
-        for i=1:length(pos)
-            newname=[newname str0(pos0(i)+1:pos(i)-1) char(hex2dec(str0(pos(i)+3:pend(i)-1)))];
-        end
-        if(pos(end)~=length(name))
-            newname=[newname str0(pos0(end-1)+1:pos0(end))];
-        end
-    end
-end
-%%-------------------------------------------------------------------------
-function val=S_(str)
-if(length(str)==1)
-  val=['C' str];
-else
-  val=['S' I_(int32(length(str))) str];
-end
-%%-------------------------------------------------------------------------
-function val=I_(num)
-if(~isinteger(num))
-    error('input is not an integer');
-end
-if(num>=0 && num<255)
-   val=['U' data2byte(cast(num,'uint8'),'uint8')];
-   return;
-end
-key='iIlL';
-cid={'int8','int16','int32','int64'};
-for i=1:4
-  if((num>0 && num<2^(i*8-1)) || (num<0 && num>=-2^(i*8-1)))
-    val=[key(i) data2byte(cast(num,cid{i}),'uint8')];
-    return;
-  end
-end
-error('unsupported integer');
-
-%%-------------------------------------------------------------------------
-function val=D_(num)
-if(~isfloat(num))
-    error('input is not a float');
-end
-
-if(isa(num,'single'))
-  val=['d' data2byte(num,'uint8')];
-else
-  val=['D' data2byte(num,'uint8')];
-end
-%%-------------------------------------------------------------------------
-function data=I_a(num,type,dim,format)
-id=find(ismember('iUIlL',type));
-
-if(id==0)
-  error('unsupported integer array');
-end
-
-if(id==1)
-  data=data2byte(int8(num),'uint8');
-  blen=1;
-elseif(id==2)
-  data=data2byte(uint8(num),'uint8');
-  blen=1;
-elseif(id==3)
-  data=data2byte(int16(num),'uint8');
-  blen=2;
-elseif(id==4)
-  data=data2byte(int32(num),'uint8');
-  blen=4;
-elseif(id==5)
-  data=data2byte(int64(num),'uint8');
-  blen=8;
-end
-
-if(nargin>=3 && length(dim)>=2 && prod(dim)~=dim(2))
-  format='opt';
-end
-if((nargin<4 || strcmp(format,'opt')) && numel(num)>1)
-  if(nargin>=3 && (length(dim)==1 || (length(dim)>=2 && prod(dim)~=dim(2))))
-      cid=I_(uint32(max(dim)));
-      data=['$' type '#' I_a(dim,cid(1)) data(:)'];
-  else
-      data=['$' type '#' I_(int32(numel(data)/blen)) data(:)'];
-  end
-  data=['[' data(:)'];
-else
-  data=reshape(data,blen,numel(data)/blen);
-  data(2:blen+1,:)=data;
-  data(1,:)=type;
-  data=data(:)';
-  data=['[' data(:)' ']'];
-end
-%%-------------------------------------------------------------------------
-function data=D_a(num,type,dim,format)
-id=find(ismember('dD',type));
-
-if(id==0)
-  error('unsupported float array');
-end
-
-if(id==1)
-  data=data2byte(single(num),'uint8');
-elseif(id==2)
-  data=data2byte(double(num),'uint8');
-end
-
-if(nargin>=3 && length(dim)>=2 && prod(dim)~=dim(2))
-  format='opt';
-end
-if((nargin<4 || strcmp(format,'opt')) && numel(num)>1)
-  if(nargin>=3 && (length(dim)==1 || (length(dim)>=2 && prod(dim)~=dim(2))))
-      cid=I_(uint32(max(dim)));
-      data=['$' type '#' I_a(dim,cid(1)) data(:)'];
-  else
-      data=['$' type '#' I_(int32(numel(data)/(id*4))) data(:)'];
-  end
-  data=['[' data];
-else
-  data=reshape(data,(id*4),length(data)/(id*4));
-  data(2:(id*4+1),:)=data;
-  data(1,:)=type;
-  data=data(:)';
-  data=['[' data(:)' ']'];
-end
-%%-------------------------------------------------------------------------
-function bytes=data2byte(varargin)
-bytes=typecast(varargin{:});
-bytes=bytes(:)';
diff --git a/plotly/plotly_aux/jsonlab/varargin2struct.m b/plotly/plotly_aux/jsonlab/varargin2struct.m
deleted file mode 100755
index 2dae992a..00000000
--- a/plotly/plotly_aux/jsonlab/varargin2struct.m
+++ /dev/null
@@ -1,40 +0,0 @@
-function opt=varargin2struct(varargin)
-%
-% opt=varargin2struct('param1',value1,'param2',value2,...)
-%   or
-% opt=varargin2struct(...,optstruct,...)
-%
-% convert a series of input parameters into a structure
-%
-% authors:Qianqian Fang (fangq<at> nmr.mgh.harvard.edu)
-% date: 2012/12/22
-%
-% input:
-%      'param', value: the input parameters should be pairs of a string and a value
-%       optstruct: if a parameter is a struct, the fields will be merged to the output struct
-%
-% output:
-%      opt: a struct where opt.param1=value1, opt.param2=value2 ...
-%
-% license:
-%     BSD license, see LICENSE_BSD.txt files for details 
-%
-% -- this function is part of jsonlab toolbox (http://iso2mesh.sf.net/cgi-bin/index.cgi?jsonlab)
-%
-
-len=length(varargin);
-opt=struct;
-if(len==0) return; end
-i=1;
-while(i<=len)
-    if(isstruct(varargin{i}))
-        opt=mergestruct(opt,varargin{i});
-    elseif(ischar(varargin{i}) && i<len)
-        opt=setfield(opt,varargin{i},varargin{i+1});
-        i=i+1;
-    else
-        error('input must be in the form of ...,''name'',value,... pairs or structs');
-    end
-    i=i+1;
-end
-
diff --git a/plotly/plotly_aux/makecall.m b/plotly/plotly_aux/makecall.m
index 15aec508..eda56e1c 100644
--- a/plotly/plotly_aux/makecall.m
+++ b/plotly/plotly_aux/makecall.m
@@ -27,7 +27,7 @@
         resp = urlread(url, 'Post', payload);
     end
 
-    st = loadjson(resp);
+    st = jsondecode(resp);
 
     response_handler(resp);
 
diff --git a/plotly/plotly_aux/plotlygetfile.m b/plotly/plotly_aux/plotlygetfile.m
index 99984a02..9f9dc9d6 100644
--- a/plotly/plotly_aux/plotlygetfile.m
+++ b/plotly/plotly_aux/plotlygetfile.m
@@ -24,6 +24,6 @@
 
     [response_string, extras] = urlread2(url, 'Get', '', headers);
     response_handler(response_string, extras);
-    response_object = loadjson(response_string);
+    response_object = jsondecode(response_string);
     figure = response_object.payload.figure;
 end
diff --git a/plotly/plotly_aux/response_handler.m b/plotly/plotly_aux/response_handler.m
index 293d8787..47a16883 100644
--- a/plotly/plotly_aux/response_handler.m
+++ b/plotly/plotly_aux/response_handler.m
@@ -11,7 +11,7 @@ function response_handler(response_body, varargin)
         end
     end
 
-    response_struct = loadjson(response_body);
+    response_struct = jsondecode(response_body);
 
     if(isempty(fieldnames(response_struct)))
         error(['Unexpected Response: ', response_body])
diff --git a/plotly/plotly_help_aux/updateplotlyhelp.m b/plotly/plotly_help_aux/updateplotlyhelp.m
index 2e6776e1..ee20d7a0 100644
--- a/plotly/plotly_help_aux/updateplotlyhelp.m
+++ b/plotly/plotly_help_aux/updateplotlyhelp.m
@@ -16,7 +16,7 @@
 end
 
 % load the json into a struct
-pr = loadjson(prContent); 
+pr = jsondecode(prContent);
 
 %------------------------MATLAB SPECIFIC TWEAKS---------------------------%
 
diff --git a/plotly/plotly_user_aux/loadplotlyconfig.m b/plotly/plotly_user_aux/loadplotlyconfig.m
index cde208d2..75bd975f 100644
--- a/plotly/plotly_user_aux/loadplotlyconfig.m
+++ b/plotly/plotly_user_aux/loadplotlyconfig.m
@@ -25,6 +25,6 @@
 
 config_string_array = fread(fileIDConfig, '*char');
 config_string = sprintf('%s',config_string_array);
-config = loadjson(config_string);
+config = jsondecode(config_string);
 
 end
diff --git a/plotly/plotly_user_aux/loadplotlycredentials.m b/plotly/plotly_user_aux/loadplotlycredentials.m
index f17c56f5..ca2057b2 100644
--- a/plotly/plotly_user_aux/loadplotlycredentials.m
+++ b/plotly/plotly_user_aux/loadplotlycredentials.m
@@ -25,6 +25,6 @@
 
 creds_string_array = fread(fileIDCred, '*char');
 creds_string = sprintf('%s',creds_string_array);
-creds = loadjson(creds_string);
+creds = jsondecode(creds_string);
 
 end
diff --git a/plotly/plotly_user_aux/signup.m b/plotly/plotly_user_aux/signup.m
index 7bebd39b..68e703b1 100644
--- a/plotly/plotly_user_aux/signup.m
+++ b/plotly/plotly_user_aux/signup.m
@@ -9,7 +9,7 @@
     payload = {'version', '0.2', 'un', username, 'email', email,'platform',platform};
     url = 'https://plot.ly/apimkacct';
     resp = urlread(url, 'Post', payload);
-    response = loadjson(resp);
+    response = jsondecode(resp);
 
     f = fieldnames(response);
     if any(strcmp(f,'error'))
