Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d6d680

Browse files
Spelling and markdown style fixes
1 parent 8c62bb3 commit 0d6d680

File tree

10 files changed

+74
-69
lines changed

10 files changed

+74
-69
lines changed

Contributing.md

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,41 @@
1-
## Repo Organization
1+
# Repo Organization
2+
23
Edit or add files in the `_posts` folder in the [source-design-merge](http://github.com/plotly/documentation/tree/source-design-merge) branch.
34

4-
## Clone the Repo and Install Dependencies
5+
## Clone the Repo and Install Dependencies
6+
57
1. Clone the repo and then check out the source-design-merge branch:
68

7-
```
8-
$ git clone [email protected]:plotly/documentation.git
9-
$ git fetch origin
10-
$ git checkout source-design-merge
11-
```
12-
13-
2. Check Ruby version `$ ruby --version`. We recommend using the same ruby version as gh-pages: https://pages.github.com/versions/. Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
9+
```sh
10+
git clone [email protected]:plotly/documentation.git
11+
git fetch origin
12+
git checkout source-design-merge
13+
```
14+
15+
2. Check Ruby version `$ ruby --version`. We recommend using the same ruby version as [gh-pages](https://pages.github.com/versions/). Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
1416

1517
3. Install bundler and dependencies from the `gemfile`:
1618

17-
```
18-
$ gem install bundler
19-
$ bundle install
20-
```
21-
Note these dependencies should be the same version that gh-pages is using: https://pages.github.com/versions/ .
19+
```sh
20+
gem install bundler
21+
bundle install
22+
```
23+
24+
Note these dependencies should be the same version that [gh-pages](https://pages.github.com/versions/) is using.
2225

2326
4. When we deploy, a function is run to update the plot schema. To do this successfully you have to make sure you have the `requests` python package: `pip install requests`
2427

2528
## Making Changes
29+
2630
- For information about editing **plotly.js** docs see: https://github.com/plotly/documentation/blob/source-design-merge/_posts/plotly_js/README.md
2731
- For information about editing **python** docs see: https://github.com/plotly/documentation/blob/source-design-merge/_posts/python/README.md
2832
- For information about editing **R** docs see: https://github.com/plotly/documentation/blob/source-design-merge/_posts/r/README.md
2933

3034
## Render Changes Locally
35+
3136
Please **ALWAYS** locally serve the docs and check your changes before committing updates.
32-
1. To serve the docs locally, in the documentation repo run: `$ bundle exec jekyll serve --config _config_dev.yml`
37+
38+
1. To serve the docs locally, in the documentation repo run: `bundle exec jekyll serve --config _config_dev.yml`
3339
2. Visit the pages at: [http://localhost:4000/python/](http://localhost:4000/python/)
3440
3. When you make changes, jekyll should automatically regenerate for you. Read the messages in your terminal to check it out
3541

@@ -39,7 +45,7 @@ excluding folders in the `_config_dev.yml` file.
3945

4046
For example, change `_config_dev.yml` to this:
4147

42-
```
48+
```yml
4349
staticurl: http://localhost:4000/all_static
4450
exclude: [_posts/ggplot2, _posts/julia, _posts/matlab, _posts/matplotlib, _posts/nodejs, _posts/r] # [_posts/python,]
4551
```
@@ -48,26 +54,28 @@ and you'll only load the files in `_posts/python`.
4854

4955
Change it to this
5056

51-
```
57+
```yml
5258
staticurl: http://localhost:4000/all_static
5359
exclude: []
5460
```
5561

5662
and it'll load everything.
5763

5864
## Deploying Changes
65+
5966
Our repo has become too big for github to process. Edit files on the `source-design-merge` branch instead of the `gh-pages` branch.
6067

6168
Deploy changes with:
62-
```
69+
70+
```sh
6371
documentation (source-design-merge) $ bundle exec rake deploy
6472
```
6573

6674
(from the `source-design-merge` branch in the root of the `documentation` repo)
6775

6876
## Search
6977

70-
We now have search via algolia implemented on our index and reference documentation pages! Please refer to our [make README](https://github.com/plotly/documentation/blob/source-design-merge/make_instructions.txt) for more information on how search works and instructions on how to update or edit Plotly search indices.
78+
We now have search via algolia implemented on our index and reference documentation pages! Please refer to our [make README](https://github.com/plotly/documentation/blob/source-design-merge/make_instructions.txt) for more information on how search works and instructions on how to update or edit Plotly search indices.
7179

7280
## Style Edits
7381

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
plotly's github-pages api documentation repository
1+
# Plotly's github-pages api documentation repository
22

33
- the [source-design-merge](http://github.com/plotly/documentation/tree/source-design-merge) branch is where edits and contributions are made
44
- the [gh-pages](http://github.com/plotly/documentation/tree/gh-pages) branch is the deploy branch, automatically updated with `$ rake deploy` inside [source-design-merge](http://github.com/plotly/documentation/tree/source-design-merge)

_posts/plotly_js/README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,34 @@
11
# Contribute to Plotly's [Javascript Documentation](https://plot.ly/javascript/)
2+
23
## Initial Steps:
4+
35
1. Clone the repo and then check out the source-design-merge branch:
46

5-
```
6-
$ git clone [email protected]:plotly/documentation.git
7-
$ git fetch origin
8-
$ git checkout source-design-merge
7+
```sh
8+
git clone [email protected]:plotly/documentation.git
9+
git fetch origin
10+
git checkout source-design-merge
911
```
1012

11-
2. Check Ruby version `$ ruby --version`. We recommend using the same ruby version as gh-pages: https://pages.github.com/versions/. Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
13+
2. Check Ruby version `$ ruby --version`. We recommend using the same ruby version as [gh-pages](https://pages.github.com/versions/). Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
1214

1315
3. Install bundler and a couple dependencies from the gemfile:
1416

15-
```
16-
$ gem install bundler
17-
$ bundle install
17+
```sh
18+
gem install bundler
19+
bundle install
20+
```
1821

19-
```
2022
<b>IMPORTANT</b> -If not using bundler and the gemfile, [install the same jekyll version that Github Pages is using](https://pages.github.com/versions/).
2123

2224
## Create Plotly.js Documentation:
23-
Our javascript tutorials are written in HTML files with embeded [codepen](http://codepen.io/plotly/) examples.
25+
26+
Our javascript tutorials are written in HTML files with embedded [codepen](http://codepen.io/plotly/) examples.
27+
2428
##### In `documentation/_posts/plotly_js`
25-
1. Create a folder titled with the chart type or topic you're adding to the documentation (i.e. `bar`)
29+
30+
1. Create a folder titled with the chart type or topic you're adding to the documentation (i.e. `bar`)
31+
2632
2. `cd` into the folder you created and create an html index file labeled: `yyyy-mm-dd-chart_type_plotlyjs_index.html`. Copy the index file template below and replace with the necessary information pertaining to the doc you are creating.
2733
```
2834
---
@@ -94,6 +100,7 @@ Our javascript tutorials are written in HTML files with embeded [codepen](http:/
94100
- Now from <b>All Buckets /plotly-tutorials/plotly-documentation/thumbnail</b> select the <b>Actions</b> dropdown and <b>upload</b> your .jpg file
95101

96102
##### In the terminal in the `documentation` repo
103+
97104
9. Commit and Push your tutorial
98105
- `git add` your .html files
99106
- `git commit -m "include a message about the tutorial you're adding"`
@@ -103,6 +110,7 @@ Our javascript tutorials are written in HTML files with embeded [codepen](http:/
103110
11. Deploy with `bundle exec rake deploy`
104111

105112
##### At https://plot.ly/javascript
113+
106114
12. Check your Tutorial!!!! This is a <b>very important</b> step.
107115
<b>PLEASE</b> visit https://plot.ly/javascript/your-tutorial and make sure everything looks correct :)
108116

_posts/plotly_js/chart-events/events/2017-01-01-order3-1_event_data.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
curveNumber: 2, // index in data of the trace associated with the selected point
5252
pointNumber: 2, // index of the selected point
5353
lat: 50, // latitude value
54-
lon: -12, // longtitude value
54+
lon: -12, // longitude value
5555
data: {/* */}, // ref to the trace as sent to Plotly.plot associated with the selected point
5656
fullData: {/* */}, // ref to the trace including all of the default attributes
5757
location: //

_posts/plotly_js/chart-events/events/2017-01-01-order6_selected_event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
sitemap: false
88
arrangement: horizontal
99
markdown_content: |
10-
Here's a simple example using the data returned from the `plotly_selected` event. `plotly_selected` returns event data for all points selected simultaneously. After creating a scatter plot with random data and two histograms that display the x and y distributions of that random data, we can select points by clicking and dragging on the plot. Upon `plotly_selected` the histograms will update to display the distribution of the x and y values of the selected points. The color of the scatter plot will be updated as well to highlight the selected points. For more examples of using `plotly_slected` and `plotly_selecting` events, see: https://plot.ly/javascript/lasso-selection/
10+
Here's a simple example using the data returned from the `plotly_selected` event. `plotly_selected` returns event data for all points selected simultaneously. After creating a scatter plot with random data and two histograms that display the x and y distributions of that random data, we can select points by clicking and dragging on the plot. Upon `plotly_selected` the histograms will update to display the distribution of the x and y values of the selected points. The color of the scatter plot will be updated as well to highlight the selected points. For more examples of using `plotly_selected` and `plotly_selecting` events, see: https://plot.ly/javascript/lasso-selection/
1111
---
1212
var graphDiv = document.getElementById('graph');
1313
var N = 1000;

_posts/plotly_js/fundamentals/2015-11-06-announcement.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ language: plotly_js
1111

1212
# Plotly.js Open-Source Announcement
1313

14-
1514
November 17, 2015
1615

1716
<blockquote class="twitter-tweet" data-lang="en"><p lang="en" dir="ltr">✨ Announcement ✨ 100% of Plotly&#39;s JavaScript charting library is now free and open-source.<a href="https://t.co/5bneDRdV98">https://t.co/5bneDRdV98</a> <a href="https://t.co/NADG6eaEmA">pic.twitter.com/NADG6eaEmA</a></p>&mdash; plotly (@plotlygraphs) <a href="https://twitter.com/plotlygraphs/status/666667595903459328">November 17, 2015</a></blockquote>
@@ -21,7 +20,7 @@ A growing number of graphing tools and libraries allow anyone to make beautiful,
2120

2221
**Today, Plotly is announcing that we have open-sourced plotly.js, the core technology and JavaScript graphing library behind Plotly’s products** (MIT license). It's all out there and free. Any developer can now integrate Plotly’s library into their own applications unencumbered. Plotly.js supports 20 chart types, including 3D plots, geographic maps, and statistical charts like density plots, histograms, box plots, and contour plots.
2322

24-
We’re big fans of collaboration, freedom, and perpetual motion. Open-source has become the de facto distribution for gold-standard scientific and business intelligence software. We want to support, participate in, and amplify this trend. By open-sourcing Plotly's core technology, everyone benefits from peer-review and Plotly's products will continue to be the most cutting-edge offering for exploratory visualization. Plotly.js has the quality, accessibility, and scope to be the charting standard for the Web, but we can only achieve this breadth by working across communities and making the distribution truly unencumbered, portable, and free.
23+
We’re big fans of collaboration, freedom, and perpetual motion. Open-source has become the de facto distribution for gold-standard scientific and business intelligence software. We want to support, participate in, and amplify this trend. By open-sourcing Plotlys core technology, everyone benefits from peer-review and Plotlys products will continue to be the most cutting-edge offering for exploratory visualization. Plotly.js has the quality, accessibility, and scope to be the charting standard for the Web, but we can only achieve this breadth by working across communities and making the distribution truly unencumbered, portable, and free.
2524

2625
Despite the possibilities that the web offers, the core plotting libraries in scientific software like MATLAB, R, and Python still create static image files rather than dynamic, interactive charts. Many technical and scientific projects still don't embrace web technology because of JavaScript libraries being commercially developed, expensive, narrow in scope, or difficult to learn and use. By open-sourcing Plotly’s easy-to-use, comprehensive library, Plotly hopes to bring the power of interactive plotting to every developer, team, data scientist, and analyst.
2726

@@ -105,7 +104,7 @@ The plotly.js roadmap is constantly changing, but 2016 is likely to be focused o
105104

106105
If you’re a JavaScript developer, consider taking a look at the plotly.js code on [GitHub](https://github.com/plotly/plotly.js). Submitting Codepen examples to [community.plot.ly](http://community.plot.ly/c/plotly-js) for the documentation is also a great way to contribute.
107106

108-
If you’re an R, Python, MATLAB, or Julia developer please consider contributing to one of the clients on [Plotly's GitHub](http://github.com/plotly/).
107+
If you’re an R, Python, MATLAB, or Julia developer please consider contributing to one of the clients on [Plotlys GitHub](http://github.com/plotly/).
109108

110109
## Humans behind the project
111110

_posts/plotly_js/fundamentals/2016-01-26-modularization.md

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ January 28, 2016
1717
modularity using a mono-repo, one npm package and several CommonJS require-able
1818
modules.
1919

20-
2120
The current era of client-side javascript stands between two major events: the
2221
npm-modules explosion is a few years behind us, but wide-spread implementation
2322
of native client-side modules by browsers is several years away.
@@ -46,8 +45,7 @@ they need.
4645
In the past two months, we surveyed library design solutions in an effort to
4746
provide the best experience for plotly.js consumers. We hope that our efforts
4847
may help maintainers of other client-side libraries make judicious design
49-
choices. We present Plotly's solution to client-side modularization below.
50-
48+
choices. We present Plotly’s solution to client-side modularization below.
5149

5250
### Problem
5351

@@ -89,7 +87,6 @@ important in 2016. Its endorsement by the version 4 of
8987
[d3](http://bost.ocks.org/mike/d3-plugin/) may make ES6 module definitions
9088
common place for the next generation of large client-side libraries.
9189

92-
9390
### Possible solution 1
9491

9592
Split up the library's modules into multiple repos, with each module linked to
@@ -113,7 +110,6 @@ discarded.
113110
- Possible code duplication unless the internal modules become npm packages too
114111
(more on that in the next section)
115112

116-
117113
### Possible solution 2
118114

119115
Another solution to the problem would place all the code under one *mono-repo*
@@ -182,7 +178,6 @@ To sum up:
182178
pulling it off.
183179
- Internal modules are prone to code duplication in the resulting bundles.
184180

185-
186181
### Possible solution 3
187182

188183
Our solution!
@@ -252,8 +247,7 @@ made the `require` statements even cleaner e.g. `require('plotly.js/core')`
252247
instead of `require('plotly.js/lib/core')`. But considering the large number of
253248
these `lib` files we have, we opt for a `lib` directory in order to not pollute
254249
the repo's root. Note that the `"main"` package.json field cannot be set to a
255-
directory (more info [here](Mention
256-
https://github.com/nodejs/node/issues/3953)).
250+
directory (more info [here](https://github.com/nodejs/node/issues/3953).
257251

258252
Our solution results in a minor increase in build time, but we feel that the
259253
flexibility it allows is well worth the hit. Browserify and webpack both have
@@ -281,7 +275,6 @@ appropriately.
281275
- Webpack users will need to add [ify-loader](https://github.com/hughsk/ify-loader)
282276
to their config file
283277

284-
285278
You can check out our latest (modular) [plotly.js release on GitHub](https://github.com/plotly/plotly.js/releases/tag/v1.5.0). If this is your first time hearing about plotly.js, check out our [gallery and documentation](https://plot.ly/javascript). We just recently open-sourced the project and you can learn more about our decision in our [open-source announcement](https://plot.ly/javascript/open-source-announcement).
286279

287280
Thanks for reading!

_posts/plotly_js/fundamentals/static-image-export/2016-05-20-static-image.md

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can save plotly graphs to static images and view them in your browser. Consi
1919
var d3 = Plotly.d3;
2020
var img_jpg= d3.select('#jpg-export');
2121

22-
// Ploting the Graph
22+
// Plotting the Graph
2323

2424
var trace={x:[3,9,8,10,4,6,5],y:[5,7,6,7,8,9,8],type:"scatter"};
2525
var trace1={x:[3,4,1,6,8,9,5],y:[4,2,5,2,1,7,3],type:"scatter"};
@@ -33,44 +33,41 @@ You can save plotly graphs to static images and view them in your browser. Consi
3333
// static image in jpg format
3434

3535
.then(
36-
function(gd)
37-
{
38-
Plotly.toImage(gd,{height:300,width:300})
39-
.then(
40-
function(url)
41-
{
42-
img_jpg.attr("src", url);
43-
return Plotly.toImage(gd,{format:'jpeg',height:400,width:400});
44-
}
45-
)
36+
function(gd)
37+
{
38+
Plotly.toImage(gd,{height:300,width:300})
39+
.then(
40+
function(url)
41+
{
42+
img_jpg.attr("src", url);
43+
return Plotly.toImage(gd,{format:'jpeg',height:400,width:400});
44+
}
45+
)
4646
});
4747
To view this image in your page include following HTML tag:
4848

4949
<img id="jpg-export"></img>
5050

5151
Height and width of the image can be adjusted by specifying the same in `toImage` call:
5252

53-
5453
Plotly.toImage(
5554
gd,{
5655
format:'jpeg',
5756
height:desired_height,
5857
width:desired_width,
5958
});
6059

61-
6260
You can also save the image using different formats.
6361

6462
# Formats Supported
6563

6664
The common image formats: 'PNG', 'JPG/JPEG' are supported. In addition, formats like 'EPS', 'SVG' and 'PDF' are also supported.
6765

68-
**Note:** The SVG, EPS and PDF Formats are only available for Plotly Professional users. You can get more details on our [pricing page] (https://plot.ly/products/cloud/)
69-
66+
**Note:** The SVG, EPS and PDF Formats are only available for Plotly Professional users. You can get more details on our [pricing page](https://plot.ly/products/cloud/)
7067

7168
## Saving as PNG ##
72-
img_png.attr("src", url);
73-
Plotly.toImage(gd,{format:'png',height:400,width:400});
69+
img_png.attr("src", url);
70+
Plotly.toImage(gd,{format:'png',height:400,width:400});
7471

7572
## Saving as SVG ##
7673
img_svg.attr("src", url);

_posts/plotly_js/maps/choropleth-maps/2015-08-11-US-pop-by-state-choropleth.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525

2626
var layout = {
27-
title: '2014 US Popultaion by State',
27+
title: '2014 US Population by State',
2828
geo:{
2929
scope: 'usa',
3030
countrycolor: 'rgb(255, 255, 255)',

0 commit comments

Comments
 (0)