Skip to content

change tld to .com from .ly #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions ggplot2/2015-08-10-getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ output:
---
# Plotly for R

Plotly is an R package for creating interactive web-based graphs via [plotly](https://plot.ly/)'s JavaScript graphing library, `plotly.js`.
Plotly is an R package for creating interactive web-based graphs via [plotly](https://plotly.com/)'s JavaScript graphing library, `plotly.js`.

The [plotly R package](https://github.com/ropensci/plotly) serializes ggplot2 figures into Plotly's <a target="_blank" href="http://plot.ly/r/reference/">universal graph JSON</a>. `plotly::ggplotly` will crawl the ggplot2 figure, extract and translate all of the attributes of the ggplot2 figure into JSON (the colors, the axes, the chart type, etc), and draw the graph with plotly.js.

Expand Down Expand Up @@ -140,7 +140,7 @@ fig <- plotly_build(fig)
str(fig)
```

This declarative description of the graph is very human readable. Every attribute of the chart, the colors, the data, the text, is described in a key-value pair in this object. [View all of the possible graph attributes.](https://plot.ly/r/reference)
This declarative description of the graph is very human readable. Every attribute of the chart, the colors, the data, the text, is described in a key-value pair in this object. [View all of the possible graph attributes.](https://plotly.com/r/reference)

Attributes of plotly figures are grouped into two categories: `data` and `layout`. `data` describes attributes that pertain to the plot's series, or "traces". These properties include things like the `x` and `y` data, the `color` and `name` of the trace, which axis the trace is bound to. `data` is an unnamed list.

Expand Down Expand Up @@ -189,7 +189,7 @@ str(fig$x$layout$plot_bgcolor) # the background color of the plot is "rgb(229,22
str(fig$x$layout$legend)
```

Each of these properties was extracted and translated from the original ggplot2 figure. [View all of the possible attributes](https://plot.ly/r/reference).
Each of these properties was extracted and translated from the original ggplot2 figure. [View all of the possible attributes](https://plotly.com/r/reference).

You can edit or add these attributes and then send the figure to Plotly. Let's add custom hover text (`text`), change the legend names (`name`) add a title (`layout$title`)

Expand Down Expand Up @@ -217,7 +217,7 @@ fig

#### Resources

- [ggplot2 examples](https://plot.ly/ggplot2)
- [Plotly's native R DSL](https://plot.ly/r)
- [Plotly's declarative graph description reference](https://plot.ly/r/reference)
- [ggplot2 examples](https://plotly.com/ggplot2)
- [Plotly's native R DSL](https://plotly.com/r)
- [Plotly's declarative graph description reference](https://plotly.com/r/reference)
- [`plotly` R package on GitHub](https://github.com/ropensci/plotly)
2 changes: 1 addition & 1 deletion ggplot2/2017-04-21-geom_quantile.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ Reference: [ggplot2 docs](http://ggplot2.tidyverse.org/reference/geom_quantile.h

### Reference

See [https://plot.ly/r/reference](https://plot.ly/r/reference) for more information and options!
See [https://plotly.com/r/reference](https://plotly.com/r/reference) for more information and options!
2 changes: 1 addition & 1 deletion ggplot2/2017-04-21-geom_rug.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ Reference: [ggplot2 docs](http://ggplot2.tidyverse.org/reference/geom_rug.html#e

### Reference

See [https://plot.ly/r/reference](https://plot.ly/r/reference) for more information and options!
See [https://plotly.com/r/reference](https://plotly.com/r/reference) for more information and options!
2 changes: 1 addition & 1 deletion ggplot2/2017-04-21-geom_spoke.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ Reference: [ggplot2 docs](http://ggplot2.tidyverse.org/reference/geom_spoke.html

### Reference

See [https://plot.ly/r/reference](https://plot.ly/r/reference) for more information and options!
See [https://plotly.com/r/reference](https://plotly.com/r/reference) for more information and options!
4 changes: 2 additions & 2 deletions ggplot2/2018-06-22-geom_sf.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ fig

### Using Native Plotly

Alternatively, you can use [`plot_ly`, `plot_geo`, or `plot_mapbox`](https://plot.ly/r/maps-sf/).
Alternatively, you can use [`plot_ly`, `plot_geo`, or `plot_mapbox`](https://plotly.com/r/maps-sf/).

### Reference

See [https://plot.ly/r/reference/](https://plot.ly/r/reference/) for more information and chart attribute options! If you would like to read more on visualizing geo-spatial data with sf and ggplotly click [here](https://blog.cpsievert.me/2018/01/30/learning-improving-ggplotly-geom-sf/).
See [https://plotly.com/r/reference/](https://plotly.com/r/reference/) for more information and chart attribute options! If you would like to read more on visualizing geo-spatial data with sf and ggplotly click [here](https://blog.cpsievert.me/2018/01/30/learning-improving-ggplotly-geom-sf/).
2 changes: 1 addition & 1 deletion ggplot2/2019-07-30-geom_hex.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ output:
knitr::opts_chunk$set(message = FALSE, warning=FALSE)
```
### Basic 2d Heatmap
See also [geom_bin2d](https://plot.ly/ggplot2/geom_bin2d/) for a similar geom with rectangular bins. Note: facetting is supported in geom\_bin2d but not geom\_hex.
See also [geom_bin2d](https://plotly.com/ggplot2/geom_bin2d/) for a similar geom with rectangular bins. Note: facetting is supported in geom\_bin2d but not geom\_hex.

Source: [Department of Canadian Heritage](https://open.canada.ca/data/en/dataset/a0bff264-1c80-41ee-aef9-e7da347c5158)

Expand Down
4 changes: 2 additions & 2 deletions r/2015-07-30-2D-Histogram.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ knitr::opts_chunk$set(message = FALSE, warning=FALSE)
```
#### Basic 2D Histogram

2D histograms require `x`/`y`, but in contrast to heatmaps, `z` is optional. If `z` is not provided, binning occurs in the browser (see [here](https://plot.ly/r/reference/#histogram2d-histnorm) for a list of binning options).
2D histograms require `x`/`y`, but in contrast to heatmaps, `z` is optional. If `z` is not provided, binning occurs in the browser (see [here](https://plotly.com/r/reference/#histogram2d-histnorm) for a list of binning options).

```{r}
# install.packages('mvtnorm')
Expand All @@ -36,7 +36,7 @@ fig2
```

#### Colorscale
If `z` is not provided, the only way to control coloring is through the [colorscale attribute](https://plot.ly/r/reference/#histogram2d-colorscale)
If `z` is not provided, the only way to control coloring is through the [colorscale attribute](https://plotly.com/r/reference/#histogram2d-colorscale)

```{r}
fig <- fig %>% add_histogram2d(colorscale = "Blues")
Expand Down
2 changes: 1 addition & 1 deletion r/2015-07-30-3d-line-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#scatter3d](https://plot.ly/r/reference/#scatter3d) for more information and chart attribute options!
See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options!
2 changes: 1 addition & 1 deletion r/2015-07-30-3d-scatter-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#scatter3d](https://plot.ly/r/reference/#scatter3d) for more information and chart attribute options!
See [https://plotly.com/r/reference/#scatter3d](https://plotly.com/r/reference/#scatter3d) for more information and chart attribute options!
2 changes: 1 addition & 1 deletion r/2015-07-30-3d-surface-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ fig
```

#### Configure Surface Contour Levels
This example shows how to slice the surface graph on the desired position for each of x, y and z axis. [contours.x.start](https://plot.ly/r/reference/#surface-contours-x-start) sets the starting contour level value, `end` sets the end of it, and `size` sets the step between each contour level.
This example shows how to slice the surface graph on the desired position for each of x, y and z axis. [contours.x.start](https://plotly.com/r/reference/#surface-contours-x-start) sets the starting contour level value, `end` sets the end of it, and `size` sets the step between each contour level.

```{r}

Expand Down
4 changes: 2 additions & 2 deletions r/2015-07-30-bar-charts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ fig

### Horizontal Bar Chart

See examples of horizontal bar charts [here](https://plot.ly/r/horizontal-bar-charts/).
See examples of horizontal bar charts [here](https://plotly.com/r/horizontal-bar-charts/).

#Reference

See [https://plot.ly/r/reference/#bar](https://plot.ly/r/reference/#bar) for more information and chart attribute options!
See [https://plotly.com/r/reference/#bar](https://plotly.com/r/reference/#bar) for more information and chart attribute options!

2 changes: 1 addition & 1 deletion r/2015-07-30-box-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,4 @@ fig

### Reference

See [https://plot.ly/r/reference/#box](https://plot.ly/r/reference/#box) for more information and chart attribute options!
See [https://plotly.com/r/reference/#box](https://plotly.com/r/reference/#box) for more information and chart attribute options!
6 changes: 3 additions & 3 deletions r/2015-07-30-bubble-charts.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ fig
To scale the bubble size, use the attribute sizeref. We recommend using the following formula to calculate a sizeref value:<br><br>
sizeref = 2. * max(array of size values) / (desired maximum marker size ** 2)
<br><br>
Note that setting sizeref to a value greater than 1 decreases the rendered marker sizes, while setting sizeref to less than 1 increases the rendered marker sizes. See [https://plot.ly/python/reference/#scatter-marker-sizeref](https://plot.ly/python/reference/#scatter-marker-sizeref) for more information.
Note that setting sizeref to a value greater than 1 decreases the rendered marker sizes, while setting sizeref to less than 1 increases the rendered marker sizes. See [https://plotly.com/python/reference/#scatter-marker-sizeref](https://plotly.com/python/reference/#scatter-marker-sizeref) for more information.
<br><br>
Additionally, we recommend setting the sizemode attribute: [https://plot.ly/python/reference/#scatter-marker-sizemode](https://plot.ly/python/reference/#scatter-marker-sizemode) to area.
Additionally, we recommend setting the sizemode attribute: [https://plotly.com/python/reference/#scatter-marker-sizemode](https://plotly.com/python/reference/#scatter-marker-sizemode) to area.


```{r}
Expand Down Expand Up @@ -256,4 +256,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#scatter](https://plot.ly/r/reference/#scatter) for more information and chart attribute options!
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!
4 changes: 2 additions & 2 deletions r/2015-07-30-contour-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ fig

### Contour Colorscales

See [here](https://plot.ly/r/colorscales/) for more examples concerning colorscales!
See [here](https://plotly.com/r/colorscales/) for more examples concerning colorscales!

### Reference

See [https://plot.ly/r/reference/#contour](https://plot.ly/r/reference/#contour) for more information and chart attribute options!
See [https://plotly.com/r/reference/#contour](https://plotly.com/r/reference/#contour) for more information and chart attribute options!
2 changes: 1 addition & 1 deletion r/2015-07-30-dumbbell-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#scatter](https://plot.ly/r/reference/#scatter) for more information and chart attribute options!
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!
6 changes: 3 additions & 3 deletions r/2015-07-30-filled-area-plots.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ knitr::opts_chunk$set(message = FALSE, warning=FALSE)
### Basic Filled Area Plot

To make an area plot with interior filling set `fill` to `"tozeroy"` in the call for the second trace.
For more informations and options about the `fill` option checkout [https://plot.ly/r/reference/#scatter-fill](https://plot.ly/r/reference/#scatter-fill)
For more informations and options about the `fill` option checkout [https://plotly.com/r/reference/#scatter-fill](https://plotly.com/r/reference/#scatter-fill)

```{r}
library(plotly)
Expand Down Expand Up @@ -152,7 +152,7 @@ fig
### Interior Filling for Area Chart

To make an area plot with interior filling set `fill` to `"tonexty"` in the call for the second trace.
For more informations and options about the `fill` option checkout [https://plot.ly/r/reference/#scatter-fill](https://plot.ly/r/reference/#scatter-fill)
For more informations and options about the `fill` option checkout [https://plotly.com/r/reference/#scatter-fill](https://plotly.com/r/reference/#scatter-fill)

```{r}
library(plotly)
Expand Down Expand Up @@ -242,4 +242,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#area](https://plot.ly/r/reference/#area) for more information and chart attribute options!
See [https://plotly.com/r/reference/#area](https://plotly.com/r/reference/#area) for more information and chart attribute options!
2 changes: 1 addition & 1 deletion r/2015-07-30-getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ Click on legend entries to hide/show traces, click-and-drag on the chart to zoom

## Next Steps

Once you have installed the `plotly` R package, learn more about the [fundamentals of making charts](https://plot.ly/r/plotly-fundamentals/) and start making [basic charts](https://plot.ly/r/basic-charts/).
Once you have installed the `plotly` R package, learn more about the [fundamentals of making charts](https://plotly.com/r/plotly-fundamentals/) and start making [basic charts](https://plotly.com/r/basic-charts/).
2 changes: 1 addition & 1 deletion r/2015-07-30-graphing-multiple-chart-types.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ fig

#Reference

See [https://plot.ly/r/reference/](https://plot.ly/r/reference/) for more information and chart attribute options!
See [https://plotly.com/r/reference/](https://plotly.com/r/reference/) for more information and chart attribute options!
6 changes: 3 additions & 3 deletions r/2015-07-30-histograms.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ fig
```
### Share bins between histograms

In this example both histograms have a compatible bin settings using [bingroup](https://plot.ly/r/reference/#histogram-bingroup) attribute.
In this example both histograms have a compatible bin settings using [bingroup](https://plotly.com/r/reference/#histogram-bingroup) attribute.
```{r}
library(plotly)

Expand All @@ -113,7 +113,7 @@ fig <- fig %>% layout(

fig
```
Note that traces on the same subplot, and with the same `barmode` ("stack", "relative", "group") are forced into the same `bingroup`, however traces with `barmode = "overlay"` and on different axes (of the same axis type) can have compatible bin settings. Histogram and [histogram2d](https://plot.ly/r/2D-Histogram/) trace can share the same `bingroup`.
Note that traces on the same subplot, and with the same `barmode` ("stack", "relative", "group") are forced into the same `bingroup`, however traces with `barmode = "overlay"` and on different axes (of the same axis type) can have compatible bin settings. Histogram and [histogram2d](https://plotly.com/r/2D-Histogram/) trace can share the same `bingroup`.

```{r}
library(plotly)
Expand All @@ -134,4 +134,4 @@ fig
```
### Reference

See [https://plot.ly/r/reference/#histogram](https://plot.ly/r/reference/#histogram) for more information and chart attribute options!
See [https://plotly.com/r/reference/#histogram](https://plotly.com/r/reference/#histogram) for more information and chart attribute options!
4 changes: 2 additions & 2 deletions r/2015-07-30-legend.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fig

### Size of Legend Items

In this example, since the [itemsizing](https://plot.ly/r/reference/#layout-legend-itemsizing) attribute is set to `constant`, the size of legend items symbols remains the same, regardless of how tiny/huge the bubbles are in the graph.
In this example, since the [itemsizing](https://plotly.com/r/reference/#layout-legend-itemsizing) attribute is set to `constant`, the size of legend items symbols remains the same, regardless of how tiny/huge the bubbles are in the graph.

```{r}
library(plotly)
Expand Down Expand Up @@ -285,4 +285,4 @@ fig

Reference

See [https://plot.ly/r/reference/#layout-legend](https://plot.ly/r/reference/#layout-legend) for more information and chart attribute options!
See [https://plotly.com/r/reference/#layout-legend](https://plotly.com/r/reference/#layout-legend) for more information and chart attribute options!
4 changes: 2 additions & 2 deletions r/2015-07-30-line-and-scatter.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ fig <- fig %>% add_trace(y = ~trace_2, name = 'trace 2', mode = 'markers')
fig
```

See more examples of line charts [here](https://plot.ly/r/line-charts/).
See more examples of line charts [here](https://plotly.com/r/line-charts/).

### Qualitative Colorscales

Expand Down Expand Up @@ -177,4 +177,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#scatter](https://plot.ly/r/reference/#scatter) for more information and chart attribute options!
See [https://plotly.com/r/reference/#scatter](https://plotly.com/r/reference/#scatter) for more information and chart attribute options!
4 changes: 2 additions & 2 deletions r/2015-07-30-polar-chart.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ knitr::opts_chunk$set(message = FALSE, warning=FALSE)

### Legacy Plots

These polar charts are legacy and will likely be deprecated in [Plotly 2.0](https://github.com/plotly/plotly.js/issues/420). Please see the new `scatterpolar` and `scatterpolargl` [trace types](https://plot.ly/r/polar-chart/) for latest and greatest in Plotly polar coordinates.
These polar charts are legacy and will likely be deprecated in [Plotly 2.0](https://github.com/plotly/plotly.js/issues/420). Please see the new `scatterpolar` and `scatterpolargl` [trace types](https://plotly.com/r/polar-chart/) for latest and greatest in Plotly polar coordinates.

### Polar Scatter Chart

Expand Down Expand Up @@ -54,4 +54,4 @@ fig
```

### Reference
See [https://plot.ly/python/reference/#area](https://plot.ly/python/reference/#area) for more information and chart attribute options!
See [https://plotly.com/python/reference/#area](https://plotly.com/python/reference/#area) for more information and chart attribute options!
14 changes: 7 additions & 7 deletions r/2015-07-30-text-and-annotations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fig <- fig %>% layout(title = 'Primates Brain and Body Weight',
fig
```

See more options on the textposition argument [here](https://plot.ly/r/reference/#scatter-textposition).
See more options on the textposition argument [here](https://plotly.com/r/reference/#scatter-textposition).

### Styling Text

Expand Down Expand Up @@ -395,9 +395,9 @@ fig
```
### Customize Displayed Text with a Text Template

To show an arbitrary text in your chart you can use [texttemplate](https://plot.ly/r/reference/#pie-texttemplate), which is a template string used for rendering the information, and will override [textinfo](https://plot.ly/r/reference/#treemap-textinfo).
To show an arbitrary text in your chart you can use [texttemplate](https://plotly.com/r/reference/#pie-texttemplate), which is a template string used for rendering the information, and will override [textinfo](https://plotly.com/r/reference/#treemap-textinfo).
This template string can include `variables` in %{variable} format, `numbers` in [d3-format's syntax](https://github.com/d3/d3-3.x-api-reference/blob/master/Formatting.md#d3_forma), and `date` in [d3-time-fomrat's syntax](https://github.com/d3/d3-3.x-api-reference/blob/master/Time-Formatting.md#format).
`texttemplate` customizes the text that appears on your plot vs. [hovertemplate](https://plot.ly/r/reference/#pie-hovertemplate) that customizes the tooltip text.
`texttemplate` customizes the text that appears on your plot vs. [hovertemplate](https://plotly.com/r/reference/#pie-hovertemplate) that customizes the tooltip text.

```{r}
library(plotly)
Expand All @@ -413,7 +413,7 @@ fig

### Customize Text Template

The following example uses [textfont](https://plot.ly/r/reference/#scatterternary-textfont) to customize the added text.
The following example uses [textfont](https://plotly.com/r/reference/#scatterternary-textfont) to customize the added text.

```{r}
library(plotly)
Expand All @@ -433,8 +433,8 @@ fig
```
### Set Date in Text Template

The following example shows how to show date by setting [axis.type](https://plot.ly/r/reference/#layout-yaxis-type) in [funnel charts](https://plot.ly/r/funnel-charts/).
As you can see [textinfo](https://plot.ly/r/reference/#funnel-textinfo) and [texttemplate](https://plot.ly/r/reference/#funnel-texttemplate) have the same functionality when you want to determine 'just' the trace information on the graph.
The following example shows how to show date by setting [axis.type](https://plotly.com/r/reference/#layout-yaxis-type) in [funnel charts](https://plotly.com/r/funnel-charts/).
As you can see [textinfo](https://plotly.com/r/reference/#funnel-textinfo) and [texttemplate](https://plotly.com/r/reference/#funnel-texttemplate) have the same functionality when you want to determine 'just' the trace information on the graph.

```{r}
fig <- plot_ly()
Expand Down Expand Up @@ -499,4 +499,4 @@ fig

#Reference

See [https://plot.ly/r/reference/#layout-annotations](https://plot.ly/r/reference/#layout-annotations) for more information and chart attribute options!
See [https://plotly.com/r/reference/#layout-annotations](https://plotly.com/r/reference/#layout-annotations) for more information and chart attribute options!
Loading