Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <head>
	<!-- Load plotly.js into the DOM -->
	<script src='https://cdn.plot.ly/plotly-latest.min.js'></script>
</head>

<body>
	<div id='myDiv'><!-- Plotly chart will be drawn inside this DIV --></div>
</body>
              
            
!

CSS

              
                
              
            
!

JS

              
                var traces = [{"name":"points","type":"scatter","mode":"markers","marker":{"color":"rgb(102,0,0)"},"x":[0,87.91817350073786,139.93298462648193,222.12094444216436,311.490468049282,222.76279979322848,260.14042634016954,50.89186780708904,561.6748309630292,199.66599554187275,627.2266338327926,1050.0323226021242,792.3739064323067,1281.5922918251756,805.3055526349933,337.58837567880687,1036.290414765312,34.06320679714947,1020.8929020925938,1737.1417632945793,1093.9270814733702,1240.153683710022,688.9079756665017,369.9838786557163,1572.577337601236,1403.118182721572,1232.2452377170193,1399.796404560647,1021.4526821601481,415.4241274094733,2180.5419550982556,1402.805981250041,2601.7941044366003,255.19713277191875,1944.9972455394675,2246.926835562785,829.7430658009991,466.1989415700525,1483.970946719879,1149.3429683713896,2647.8113156319823,2510.46839083904,423.60071128665896,268.3093631356861,3142.9990350360144,3978.6513166010736,603.8293452116084,1396.670794644617,4760.954829365843,26.83832555386826,1608.0260661096268,1686.7060678881046,4791.0622838988065,3605.4052969732365,4328.820855414956,973.4050161356994,4141.966071693618,2279.9237883396413,4948.842829311026,3301.177334804326,3115.8178901649635,441.66916249208674,1597.7706838801485,2822.2726686917254,1547.4368622196835,6090.605812191862,4311.457596734954,2348.8627592287676,626.6252164303164,2771.9709636473544,6889.88867205301,3229.8005723160445,2493.07546361018,3983.7103030927105,1553.366885612944,2512.5238391331254,3408.6339585081,3271.0447558533297,455.6005740478161,2765.4121049239675,1096.1619448848357,8011.359115308434,6253.281594944367,401.1451368605351,6412.843522539036,3192.4091774126814,3379.3061582851933,7482.230401605119,2423.5503780839927,5124.538566758849,5545.982480602598,1030.8872795229013,6281.761495612549,9228.18519940512,4240.420032835052,8931.87995717273,2036.5747013360506,1926.4278588552518,8491.761248792243,9433.687177394244],"y":[0,29.44255614123087,174.78536661107566,199.3859831822625,309.58526680452326,304.3349759875661,61.37587484599618,354.63187859308584,733.3568349484638,130.4923593790095,711.6086644976504,1043.8957545027058,1054.381242853171,112.82173335444179,1261.9520174471386,1008.0765233584095,989.51745549935,1501.0433739432015,360.8001780964995,1813.3128059431253,765.0350248203985,1934.4100094574583,410.0174174274537,1023.5581263380541,497.9471500408462,1403.6325947139765,719.0788611382526,726.9135891814084,879.6104310991363,1020.8872672839526,2269.9216086358033,3039.8443381982574,1466.0521024353163,1902.2556423834878,911.2256747923946,761.4540821560879,3594.036998684355,3305.8159239460097,2140.589207141563,185.92833322784648,688.0780782233637,2957.862464814137,1916.9508306940334,3830.086178607885,3626.4249008416677,864.3775494250148,2498.6371784347875,2819.698239094671,3018.5400186361994,4669.920466897009,2249.584210593572,3827.8381429780843,3437.6829349873765,4416.5260901246065,422.58705603595894,2396.035676357728,174.97781130429172,2296.02838651042,3238.884135218511,5319.389309613484,1060.7352704394855,4605.4324468849945,2462.9692326176405,1065.0767028900495,2059.832200090966,2731.562327574978,4045.2594370071106,2544.87534301595,3815.631334769523,1233.2030597217465,3398.1118831223753,7001.367148555364,16.237164646658364,4981.337452579477,6807.700300620839,419.45214596329794,3112.8433400470994,1685.8545681716869,2490.4108236504376,7164.644768046035,6657.522083166926,5305.266247875243,2402.710360498224,2.3540765884442427,6472.0476553344615,4929.527481140966,4232.875308647165,4592.980970595543,4735.220510373991,8369.997904214315,3166.540137971943,3711.1766950898195,5608.683844994838,9.920706090856957,5150.744585262783,4429.013651462633,8735.378437915138,2888.5188719925404,5208.009460609084,4257.118865204851]},{"name":"density","type":"histogram2dcontour","mode":"markers","ncontours":20,"reversescale":20,"x":[0,87.91817350073786,139.93298462648193,222.12094444216436,311.490468049282,222.76279979322848,260.14042634016954,50.89186780708904,561.6748309630292,199.66599554187275,627.2266338327926,1050.0323226021242,792.3739064323067,1281.5922918251756,805.3055526349933,337.58837567880687,1036.290414765312,34.06320679714947,1020.8929020925938,1737.1417632945793,1093.9270814733702,1240.153683710022,688.9079756665017,369.9838786557163,1572.577337601236,1403.118182721572,1232.2452377170193,1399.796404560647,1021.4526821601481,415.4241274094733,2180.5419550982556,1402.805981250041,2601.7941044366003,255.19713277191875,1944.9972455394675,2246.926835562785,829.7430658009991,466.1989415700525,1483.970946719879,1149.3429683713896,2647.8113156319823,2510.46839083904,423.60071128665896,268.3093631356861,3142.9990350360144,3978.6513166010736,603.8293452116084,1396.670794644617,4760.954829365843,26.83832555386826,1608.0260661096268,1686.7060678881046,4791.0622838988065,3605.4052969732365,4328.820855414956,973.4050161356994,4141.966071693618,2279.9237883396413,4948.842829311026,3301.177334804326,3115.8178901649635,441.66916249208674,1597.7706838801485,2822.2726686917254,1547.4368622196835,6090.605812191862,4311.457596734954,2348.8627592287676,626.6252164303164,2771.9709636473544,6889.88867205301,3229.8005723160445,2493.07546361018,3983.7103030927105,1553.366885612944,2512.5238391331254,3408.6339585081,3271.0447558533297,455.6005740478161,2765.4121049239675,1096.1619448848357,8011.359115308434,6253.281594944367,401.1451368605351,6412.843522539036,3192.4091774126814,3379.3061582851933,7482.230401605119,2423.5503780839927,5124.538566758849,5545.982480602598,1030.8872795229013,6281.761495612549,9228.18519940512,4240.420032835052,8931.87995717273,2036.5747013360506,1926.4278588552518,8491.761248792243,9433.687177394244],"y":[0,29.44255614123087,174.78536661107566,199.3859831822625,309.58526680452326,304.3349759875661,61.37587484599618,354.63187859308584,733.3568349484638,130.4923593790095,711.6086644976504,1043.8957545027058,1054.381242853171,112.82173335444179,1261.9520174471386,1008.0765233584095,989.51745549935,1501.0433739432015,360.8001780964995,1813.3128059431253,765.0350248203985,1934.4100094574583,410.0174174274537,1023.5581263380541,497.9471500408462,1403.6325947139765,719.0788611382526,726.9135891814084,879.6104310991363,1020.8872672839526,2269.9216086358033,3039.8443381982574,1466.0521024353163,1902.2556423834878,911.2256747923946,761.4540821560879,3594.036998684355,3305.8159239460097,2140.589207141563,185.92833322784648,688.0780782233637,2957.862464814137,1916.9508306940334,3830.086178607885,3626.4249008416677,864.3775494250148,2498.6371784347875,2819.698239094671,3018.5400186361994,4669.920466897009,2249.584210593572,3827.8381429780843,3437.6829349873765,4416.5260901246065,422.58705603595894,2396.035676357728,174.97781130429172,2296.02838651042,3238.884135218511,5319.389309613484,1060.7352704394855,4605.4324468849945,2462.9692326176405,1065.0767028900495,2059.832200090966,2731.562327574978,4045.2594370071106,2544.87534301595,3815.631334769523,1233.2030597217465,3398.1118831223753,7001.367148555364,16.237164646658364,4981.337452579477,6807.700300620839,419.45214596329794,3112.8433400470994,1685.8545681716869,2490.4108236504376,7164.644768046035,6657.522083166926,5305.266247875243,2402.710360498224,2.3540765884442427,6472.0476553344615,4929.527481140966,4232.875308647165,4592.980970595543,4735.220510373991,8369.997904214315,3166.540137971943,3711.1766950898195,5608.683844994838,9.920706090856957,5150.744585262783,4429.013651462633,8735.378437915138,2888.5188719925404,5208.009460609084,4257.118865204851]},{"name":"histogram","type":"histogram","xaxis":"x","yaxis":"y2","x":[0,87.91817350073786,139.93298462648193,222.12094444216436,311.490468049282,222.76279979322848,260.14042634016954,50.89186780708904,561.6748309630292,199.66599554187275,627.2266338327926,1050.0323226021242,792.3739064323067,1281.5922918251756,805.3055526349933,337.58837567880687,1036.290414765312,34.06320679714947,1020.8929020925938,1737.1417632945793,1093.9270814733702,1240.153683710022,688.9079756665017,369.9838786557163,1572.577337601236,1403.118182721572,1232.2452377170193,1399.796404560647,1021.4526821601481,415.4241274094733,2180.5419550982556,1402.805981250041,2601.7941044366003,255.19713277191875,1944.9972455394675,2246.926835562785,829.7430658009991,466.1989415700525,1483.970946719879,1149.3429683713896,2647.8113156319823,2510.46839083904,423.60071128665896,268.3093631356861,3142.9990350360144,3978.6513166010736,603.8293452116084,1396.670794644617,4760.954829365843,26.83832555386826,1608.0260661096268,1686.7060678881046,4791.0622838988065,3605.4052969732365,4328.820855414956,973.4050161356994,4141.966071693618,2279.9237883396413,4948.842829311026,3301.177334804326,3115.8178901649635,441.66916249208674,1597.7706838801485,2822.2726686917254,1547.4368622196835,6090.605812191862,4311.457596734954,2348.8627592287676,626.6252164303164,2771.9709636473544,6889.88867205301,3229.8005723160445,2493.07546361018,3983.7103030927105,1553.366885612944,2512.5238391331254,3408.6339585081,3271.0447558533297,455.6005740478161,2765.4121049239675,1096.1619448848357,8011.359115308434,6253.281594944367,401.1451368605351,6412.843522539036,3192.4091774126814,3379.3061582851933,7482.230401605119,2423.5503780839927,5124.538566758849,5545.982480602598,1030.8872795229013,6281.761495612549,9228.18519940512,4240.420032835052,8931.87995717273,2036.5747013360506,1926.4278588552518,8491.761248792243,9433.687177394244]},{"name":"y density","type":"histogram","xaxis":"x2","marker":{"color":"rgb(102,0,0)"},"y":[0,29.44255614123087,174.78536661107566,199.3859831822625,309.58526680452326,304.3349759875661,61.37587484599618,354.63187859308584,733.3568349484638,130.4923593790095,711.6086644976504,1043.8957545027058,1054.381242853171,112.82173335444179,1261.9520174471386,1008.0765233584095,989.51745549935,1501.0433739432015,360.8001780964995,1813.3128059431253,765.0350248203985,1934.4100094574583,410.0174174274537,1023.5581263380541,497.9471500408462,1403.6325947139765,719.0788611382526,726.9135891814084,879.6104310991363,1020.8872672839526,2269.9216086358033,3039.8443381982574,1466.0521024353163,1902.2556423834878,911.2256747923946,761.4540821560879,3594.036998684355,3305.8159239460097,2140.589207141563,185.92833322784648,688.0780782233637,2957.862464814137,1916.9508306940334,3830.086178607885,3626.4249008416677,864.3775494250148,2498.6371784347875,2819.698239094671,3018.5400186361994,4669.920466897009,2249.584210593572,3827.8381429780843,3437.6829349873765,4416.5260901246065,422.58705603595894,2396.035676357728,174.97781130429172,2296.02838651042,3238.884135218511,5319.389309613484,1060.7352704394855,4605.4324468849945,2462.9692326176405,1065.0767028900495,2059.832200090966,2731.562327574978,4045.2594370071106,2544.87534301595,3815.631334769523,1233.2030597217465,3398.1118831223753,7001.367148555364,16.237164646658364,4981.337452579477,6807.700300620839,419.45214596329794,3112.8433400470994,1685.8545681716869,2490.4108236504376,7164.644768046035,6657.522083166926,5305.266247875243,2402.710360498224,2.3540765884442427,6472.0476553344615,4929.527481140966,4232.875308647165,4592.980970595543,4735.220510373991,8369.997904214315,3166.540137971943,3711.1766950898195,5608.683844994838,9.920706090856957,5150.744585262783,4429.013651462633,8735.378437915138,2888.5188719925404,5208.009460609084,4257.118865204851]}];
 var layout = {"height":550,"width":600,"title":{"text":"XY.Histogram2dContour.WithDensity"},"showlegend":false,"autosize":false,"xaxis":{"showgrid":false,"zeroline":false,"showline":false,"domain":[0,0.85]},"yaxis":{"showgrid":false,"zeroline":false,"showline":false,"domain":[0,0.85]},"xaxis2":{"showgrid":false,"zeroline":false,"showline":false,"domain":[0.85,1]},"yaxis2":{"showgrid":false,"zeroline":false,"showline":false,"domain":[0.85,1]}};
 var config = {"responsive":true,"scrollZoom":true,"displaylogo":false};
 Plotly.newPlot("myDiv", traces, layout, config);

console.log(Plotly.validate(traces, layout))
              
            
!
999px

Console