Skip to content
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

Docs 1.5.5 #269

Merged
merged 7 commits into from
Dec 18, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Update README_PYTHON.md and examples.md
  • Loading branch information
alshan committed Dec 15, 2020
commit 0ba68682d4c1becf90e6895ab934335269795165
114 changes: 72 additions & 42 deletions README_PYTHON.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@
- [GGBunch](#ggbunch)
- [Data Sampling](#sampling)
- [Export to File](#export)
- [Cloud Notebooks](#cloud_based)
- [The 'bistro' Package](#bistro)
- [Correlation Plot](#corr_plot)
- [Image Matrix](#image_matrix)
- [Geospatial](#geospatial)
- [GeoPandas Support](#geopandas)
- [Interactive Maps](#livemap)
- [Geocoding API](#geocoding)
- [Interesting Demos](#interesting)
- ['No Javascript' Mode](#no_js)
- [Offline Mode](#offline)
- [Interesting Demos](#interesting)
- [Scientific Mode in IntelliJ IDEA / PyCharm](#pycharm)
- [What is new in 1.5.3](#new)
- [What is new in 1.5.5](#new)
- [Change Log](#change_log)
- [License](#license)

Expand Down Expand Up @@ -85,6 +88,8 @@ pip install lets-plot
<a id="start"></a>
### Quick start with Jupyter

You can use Lets-Plot in Jupyter notebook or other notebook of your choice, like Datalore, Kaggle or Colab.

To evaluate the plotting capabilities of Lets-Plot, add the following code to a Jupyter notebook:
```python
import numpy as np
Expand Down Expand Up @@ -155,15 +160,32 @@ Note: The `ggsave()` function currently do not save images of interactive maps t
Example notebook: [export_SVG_HTML](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/export_SVG_HTML.ipynb)


<a id="cloud_based"></a>
### Cloud Notebooks
<a id="bistro"></a>
### The 'bistro' Package

Examples:
The 'bistro' package is a collection of higher level API functions, each allows
to create a certain kind of plot with a single function call instead of combining a plethora of plot features manually.

* [Datalore](https://view.datalore.io/notebook/Zzg9EVS6i16ELQo3arzWsP)
* [Kaggle](https://www.kaggle.com/alshan/lets-plot-quickstart)
* [Colab](https://colab.research.google.com/drive/1o9rFQbkGqvvixYLTogrzIjFPp1ti2cH-)
<a id="corr_plot"></a>
#### Correlation Plot

The `corr_plot()` function creates a fluent builder object offering a set of methods for
configuring of beautiful correlation plots. A call to the terminal `build()` method in the end
will create a resulting plot object.

Example: [TODO]

<a id="image_matrix"></a>
#### Image Matrix

The `image_matrix()` function arranges a set of images in a grid.

Example: [image_matrix.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_matrix.ipynb)

The `image_matrix()` function uses `geom_image` under the hood, so you might want to check out these demos as well:
* [image_101.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_101.ipynb)
* [image_fisher_boat.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_fisher_boat.ipynb)

<a id="geospatial"></a>
### Geospatial

Expand All @@ -189,14 +211,28 @@ Geocoding is the process of converting names of places into geographic coordinat

Learn more: [Geocoding API](https://github.com/JetBrains/lets-plot/blob/master/docs/geocoding.md).

<a id="interesting"></a>
### Interesting Demos
<a id="no_js"></a>
### 'No Javascript' Mode

In the 'no javascript' mode Lets-Plot genetares plots as bare-bones SVG images.

This mode is halpfull when there is a requirement to render notebooks in an 'ipnb' renderer which does not suppopt javascript
(like GitHub's built-in renderer).

Activate 'no javascript' mode using the `LetsPlot.setup_html()` method call:
```python
from lets_plot import *

LetsPlot.setup_html(no_js=True)
```

Alternativaly, you can set up the environment variable:
```
LETS_PLOT_NO_JS = true (other accepted values are: 1, t, y, yes)
```

Note: interactive maps do not support the 'no javascript' mode.

A set of [interesting notebooks](https://github.com/denisvstepanov/lets-plot-examples/blob/master/README.md) using `Lets-Plot` library for visualization.
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/examples/images/klein_bottle.png" alt="Couldn't load klein_bottle.png" width="498" height="386">
<br>


<a id="offline"></a>
### Offline Mode

Expand All @@ -209,7 +245,15 @@ from lets_plot import *
LetsPlot.setup_html(offline=True)
```

Note: internet connection is still required for interactive maps and geocoding API.

<a id="interesting"></a>
### Interesting Demos

A set of [interesting notebooks](https://github.com/denisvstepanov/lets-plot-examples/blob/master/README.md) using `Lets-Plot` library for visualization.
<img src="https://raw.githubusercontent.com/JetBrains/lets-plot/master/docs/examples/images/klein_bottle.png" alt="Couldn't load klein_bottle.png" width="498" height="386">
<br>

<a id="pycharm"></a>
### Scientific mode in IntelliJ IDEA / PyCharm

Expand All @@ -229,36 +273,22 @@ To learn more about the plugin check: [Lets-Plot in SciView plugin homepage](htt
</div>

<a id="new"></a>
### What is new in 1.5.3

- Tooltip Customization

New API for customization of tooltip contents and its position (see [Tooltip Customization](https://github.com/JetBrains/lets-plot/blob/master/docs/tooltips.md)).
### What is new in 1.5.5

- Attribution when Configuring 3-rd Party Map-tiles

New arguments in the `maptiles_zxy()` function allowing configuring attributions
when using 3-rd party map-tiles as a base-map layer.

See [The Gallery of Base-maps](https://www.kaggle.com/alshan/the-gallery-of-basemaps).

- Formatting labels in `geom_text()`

New parameter, 'label_format' to define a formatting pattern.

See demo: [label_format.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/label_format.ipynb)

- Export to File
- Correlation plot

New higher level API in [the 'bistro' package](#bistro) allowing with little efforts building of beautiful correlation plots.

- 'no javascript' mode

The `ggsave()` function is an easy way to export plot to a file in SVG or HTML formats.

Note: The `ggsave()` function currently do not save images of interactive maps to SVG.

Example: [export_SVG_HTML](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/export_SVG_HTML.ipynb)
Enables plots that can be rendered in notebook renderers which do not support javascript.
See ['No Javascript' Mode](#no_js) for more details.

- New tooltip anchor options: 'center' and 'middle'

- Fixed 'HUE' Scale and Other Fixes
See: [Tooltip Customization](https://github.com/JetBrains/lets-plot/blob/master/docs/tooltips.md)) for more details.

See [CHANGELOG.md](https://github.com/JetBrains/lets-plot/blob/master/CHANGELOG.md) for details.
See [CHANGELOG.md](https://github.com/JetBrains/lets-plot/blob/master/CHANGELOG.md) for more details.

<a id="change_log"></a>
### Change Log
Expand Down
27 changes: 23 additions & 4 deletions docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Try the following tutorials and examples to learn and evaluate various features
- [Theme](#theme)
- [Data Sampling](#sampling)
- [Tooltip Customization](#tooltip)
- [The 'bistro' Package](#bistro)
- [GeoPandas Support](#geopandas)
- [Interactive Maps](#livemap)
- [Geocoding API](#geocoding)
Expand All @@ -22,7 +23,8 @@ Try the following tutorials and examples to learn and evaluate various features
<a id="quickstart"></a>
#### Quickstart and User Guide

- Quickstart: <a href="https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/quickstart.ipynb">
- Quickstart:
<a href="https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/quickstart.ipynb">
<img src="https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.png" width="109" height="20" align="left">
</a>
<span>&nbsp;&nbsp;</span>
Expand Down Expand Up @@ -68,16 +70,21 @@ Try the following tutorials and examples to learn and evaluate various features

`geom_image, geom_raster`

`geom_image()` displays an image specified by a ndarray with shape (n,m) or (n,m,3) or (n,m,4).
`geom_image()`: displays an image specified by a ndarray with shape (n,m) or (n,m,3) or (n,m,4).

* [image_101.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_101.ipynb)
* [image_fisher_boat.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_fisher_boat.ipynb)
* [image_matrix.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_matrix.ipynb)
* [image_fisher_boat.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_fisher_boat.ipynb)

See also: `image_matrix` in [The 'bistro' Package](#bistro).

`geom_text`, label format

[label_format.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/label_format.ipynb)

`stat_corr`

See the 'corr_plot' example in [The 'bistro' Package](#bistro).


<a id="pos"></a>
#### Position Adjustment
Expand Down Expand Up @@ -157,6 +164,18 @@ See: [Sampling in Lets-Plot](https://github.com/JetBrains/lets-plot/blob/master/
See also [Tooltip Customization](https://github.com/JetBrains/lets-plot/blob/master/docs/tooltips.md).


<a id="bistro"></a>
### The 'bistro' Package

#### `from lets_plot.bistro.corr`

`corr_plot` (also `stat_corr`): [TODO]

#### `from lets_plot.bistro.im`

`image_matrix`: [image_matrix.ipynb](https://nbviewer.jupyter.org/github/JetBrains/lets-plot/blob/master/docs/examples/jupyter-notebooks/image_matrix.ipynb)


<a id="geopandas"></a>
#### GeoPandas Support

Expand Down