diff --git a/_posts/plotly_js/maps/fill-area-on-mapbox/2019-09-02-fill-area_plotly_js_index.html b/_posts/plotly_js/maps/fill-area-on-mapbox/2019-09-02-fill-area_plotly_js_index.html index 16f2c3ed7a07..0aa9c6d018a3 100644 --- a/_posts/plotly_js/maps/fill-area-on-mapbox/2019-09-02-fill-area_plotly_js_index.html +++ b/_posts/plotly_js/maps/fill-area-on-mapbox/2019-09-02-fill-area_plotly_js_index.html @@ -2,7 +2,7 @@ name: Filled Area on Maps permalink: javascript/filled-area-on-mapbox/ description: How to make an area on Map using a D3.js-based scattermapbox. -layout: user-guide +layout: base thumbnail: thumbnail/area.jpg language: plotly_js has_thumbnail: true diff --git a/_posts/plotly_js/statistical/box/2020-01-09-precomputed-quartiles copy.html b/_posts/plotly_js/statistical/box/2020-01-09-precomputed-quartiles copy.html new file mode 100644 index 000000000000..4590b2c6e387 --- /dev/null +++ b/_posts/plotly_js/statistical/box/2020-01-09-precomputed-quartiles copy.html @@ -0,0 +1,51 @@ +--- +name: Using Precomputed Values For Quartiles +arrangement: horizontal +language: plotly_js +suite: box +order: 14 +sitemap: false +markdown_content: | + Instead of using one of the built-in algorithms to compute quartiles, you might want to precompute the values of the quartiles. This could be because you have a large data set and computing quartiles at runtime would slow down your application, or if you want to use a different algorithm than the ones that are provided. In this case, omit the `quartilemethod` attribute and pass in the values you want to use directly. +--- + +Plotly.newPlot('myDiv', [ + { + "type": "box", + "name": "just q1/median/q3", + "offsetgroup": "1", + "q1": [ 1, 2, 1 ], + "median": [ 2, 3, 2 ], + "q3": [ 3, 4, 3 ] + }, + { + "type": "box", + "name": "q1/median/q3/lowerfence/upperfence", + "offsetgroup": "2", + "q1": [ 1, 2, 1 ], + "median": [ 2, 3, 2 ], + "q3": [ 3, 4, 3 ], + "lowerfence": [ 0, 1, 0 ], + "upperfence": [ 4, 5, 4 ] + }, + { + "type": "box", + "name": "all pre-computed stats", + "offsetgroup": "3", + "q1": [ 1, 2, 1 ], + "median": [ 2, 3, 2 ], + "q3": [ 3, 4, 3 ], + "lowerfence": [ 0, 1, 0 ], + "upperfence": [ 4, 5, 4 ], + "mean": [ 2.2, 2.8, 2.2 ], + "sd": [ 0.4, 0.4, 0.4 ], + "notchspan": [ 0.2, 0.1, 0.2 ] + }], + { + boxmode: 'group', + legend: { + x: 0, + y: 1, yanchor: 'bottom' + } + } +) \ No newline at end of file diff --git a/_posts/plotly_js/statistical/box/2020-01-09-quartile-methods.html b/_posts/plotly_js/statistical/box/2020-01-09-quartile-methods.html new file mode 100644 index 000000000000..fddb7a70bbc4 --- /dev/null +++ b/_posts/plotly_js/statistical/box/2020-01-09-quartile-methods.html @@ -0,0 +1,37 @@ +--- +name: Choosing the Algorithm Used To Compute Quartiles +arrangement: horizontal +language: plotly_js +suite: box +order: 13 +sitemap: false +markdown_content: | + The `quartilemethod` attribute controls the algorithm that is used to compute quartiles for box plots. + + - The *linear* algorithm uses the 25th percentile for Q1 and 75th percentile for Q3, as computed using method #10 listed at [http://www.amstat.org/publications/jse/v14n3/langford.html](http://www.amstat.org/publications/jse/v14n3/langford.html). + - The *exclusive* algorithm uses the median to divide the ordered dataset into two halves. If the sample is odd, it does not includes the median in either half. + - The *inclusive* algorithm also uses the median to divide the ordered dataset into two halves. However, if the sample is odd, it includes the median in both halves. +--- +Plotly.newPlot('myDiv', { + "data": [{ + "type": "box", + "y": [1, 2, 3, 4, 5], + "name": "linear" + }, + { + "type": "box", + "y": [1, 2, 3, 4, 5], + "name": "exclusive", + "quartilemethod": "exclusive" + }, + { + "type": "box", + "y": [1, 2, 3, 4, 5], + "name": "inclusive", + "quartilemethod": "inclusive" + }], + "layout": { + "width": 400, + "height": 400 + } + }) \ No newline at end of file