An open-source plotting library for statistical data.

Overview

Lets-Plot official JetBrains project

Couldn't load MIT license svg

Lets-Plot is an open-source plotting library for statistical data. It is implemented using the Kotlin programming language.

The design of Lets-Plot library is heavily influenced by Leland Wilkinson work The Grammar of Graphics describing the deep features that underlie all statistical graphics.

This grammar [...] is made up of a set of independent components that can be composed in many different ways. This makes [it] very powerful because you are not limited to a set of pre-specified graphics, but you can create new graphics that are precisely tailored for your problem.

Due to the unique multi-platform nature of Kotlin programming language, you can obtain the plotting functionality that is packaged as a JavaScript library, JVM library, and a native Python extension.

Lets-Plot for Python



The Lets-Plot for Python package offers a ggplot-like API for data visualization in Jupyter notebooks as well as in other notebooks like Datalore, Kaggle or Colab.

You can even create plots using Python editor in PyCharm or IntelliJ IDEA (Scientific mode, the Lets-Plot in SciView plugin is required).

Read the Lets-Plot for Python documentation to learn more about the package installation and usage.

Couldn't load quickstart.png

JVM artifacts and Kotlin API

Download

Lets-Plot Kotlin API adds Grammar-of-Graphics plotting capabilities to Kotlin kernels for Jupyter notebooks.

Apart from Jupyter notebooks, Lets-Plot Kotlin API enables embedding plots into a JVM-based application.

To learn more about creating plots in a JVM environment see README_DEV.md in the Lets-Plot Kotlin project on GitHub.

"Lets-Plot in SciView" plugin for IntelliJ IDEA and PyCharm

JetBrains Plugins JetBrains plugins

The plugin adds support for interactive plots in IntelliJ-based IDEs with the enabled Scientific mode.

The Scientific mode in PyCharm and in IntelliJ IDEA Python plugin provides support for interactive scientific computing and data visualization.

To learn more about Scientific mode check these help pages:

To learn more about the plugin check: Lets-Plot in SciView plugin homepage.

Couldn't load pycharm_quickstart.png Couldn't load pycharm_logo.png

License

Code and documentation released under the MIT license. Copyright © 2019-2020, JetBrains s.r.o.

Comments
  • Select better labels for datatime axis

    Select better labels for datatime axis

    val data = mapOf(
    
    "time" to doubleArrayOf(0.0, 90*60*1000.0, 2*90*60*1000.0) ,

        "rate" to doubleArrayOf(0.0, 50.0, 250.0)

    )
    
val plot = letsPlot(data) + geomLine { x = "time"; y = "rate" } +
    
        scaleXDateTime("Time", expand = listOf(0, 0))
    

    Output: time chart

    Note how labels are duplicated, and it is hard to tell which means what

    The very first label should probably include more time units.

    opened by vlsi 11
  • Support for more map projections

    Support for more map projections

    Thanks for your work on this amazing project!

    I got a question about the coord_map() that uses Mercator projection, which is a conformal one that preserves shapes. There are many other map projections with different properties that could be useful in different situations as well. Is there any plan to support more map projections?

    opened by wang-boyu 10
  • Js import is dropped on cell recalculation

    Js import is dropped on cell recalculation

    1. Plot something (e. g. an example from tutorial)
    2. Recalculate the same cell
    3. Refresh the page

    Expected: The plot is still shown

    Actual: No plot is shown, an exception window.letsPlotCall is not a function in js console

    opened by uppi 10
  • Not working in windows cmd prompt

    Not working in windows cmd prompt

    let's plot works well in pycharm and jupyter notebook. But when I try to run the script in cmd prompt, errors occour:

    from lets_plot import *
    
    D:\programfiles\anaconda\lib\site-packages\numpy\__init__.py:143: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service
      from . import _distributor_init
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\__init__.py", line 17, in <module>
        from .frontend_context import *
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\frontend_context\__init__.py", line 6, in <module>
        from ._configuration import *
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\frontend_context\_configuration.py", line 8, in <module>
        from ._html_contexts import _create_html_frontend_context, _use_isolated_frame
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\frontend_context\_html_contexts.py", line 7, in <module>
        from ._jupyter_notebook_ctx import JupyterNotebookContext
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\frontend_context\_jupyter_notebook_ctx.py", line 14, in <module>
        from .. import _kbridge as kbr
      File "C:\Users\yuliang18\AppData\Roaming\Python\Python38\site-packages\lets_plot\_kbridge.py", line 7, in <module>
        import lets_plot_kotlin_bridge
    ImportError: DLL load failed while importing lets_plot_kotlin_bridge: 找不到指定的模块。
    
    

    Environment:

    • win 64
    • python 3.8.8
    • lets plot 2.1
    • conda install m2w64-toolchain : done
    opened by antonio-yu 8
  • Not working with PyCharm, fails to send plot 500 Error

    Not working with PyCharm, fails to send plot 500 Error

    running the example code fails

    import numpy as np
    from lets_plot import *
    
    # Generate random data-points for the demo.
    np.random.seed(12)
    data = dict(
        cond=np.repeat(['A', 'B'], 200),
        rating=np.concatenate((np.random.normal(0, 1, 200), np.random.normal(1, 1.5, 200)))
    )
    
    # Create plot specification.
    p = ggplot(data, aes(x='rating', fill='cond')) + ggsize(500, 250) \
        + geom_density(color='dark_green', alpha=.7) + scale_fill_brewer(type='seq') \
        + theme(axis_line_y='blank')
    
    # Display plot in 'SciView'.
    p.show()
    

    fails as shown

    Error: failed to send plot to http://127.0.0.1:63342
    Traceback (most recent call last):
      File "/Users/robinnorthcott/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/212.5284.44/PyCharm.app/Contents/plugins/python/helpers/pycharm_display/datalore/display/display_.py", line 76, in _send_display_message
        urllib_request.urlopen(url, buffer)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
        response = meth(req, response)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
        response = self.parent.error(
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
        return self._call_chain(*args)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
        result = func(*args)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 500: Internal Server Error
    During handling of the above exception, another exception occurred:
    Traceback (most recent call last):
      File "/Users/robinnorthcott/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-P/ch-0/212.5284.44/PyCharm.app/Contents/plugins/python/helpers/pycharm_display/datalore/display/display_.py", line 60, in try_empty_proxy
        urllib_request.urlopen(url, buffer)
      File "/usr/local/Cellar/pyt[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 214, in urlopen
        return opener.open(url, data, timeout)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 523, in open
        response = meth(req, response)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 632, in http_response
        response = self.parent.error(
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 561, in error
        return self._call_chain(*args)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 494, in _call_chain
        result = func(*args)
      File "/usr/local/Cellar/[email protected]/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/urllib/request.py", line 641, in http_error_default
        raise HTTPError(req.full_url, code, msg, hdrs, fp)
    urllib.error.HTTPError: HTTP Error 500: Internal Server Error
    
    opened by boofhead 8
  • scaleColorManual swaps labels if dataframe contains single label

    scaleColorManual swaps labels if dataframe contains single label

    STEPS TO REPRODUCE

    1. Create a dataframe with a single label (e.g. "sedentary")
    2. Create a scaleColorManual with multiple labels (e.g. "sedentary", "walking", "running", "biking")
    3. Graph the data

    RESULTS Actual The legend shows "walking" with the color for walking, but there was no walking data in the dataframe. The sedentary data was erroneously remapped to walking.

    Expected The legend shows "sedentary" with the color for sedentary.

    NOTES If I remove scaleColorManual, the bug no longer occurs.

    I'm graphing wearable sensor data with a set of different labels. Not every label will be in every graph, and some graphs might only have a single label.

    As an example, consider graphing heart rate versus activities like sedentary, walking, running, biking. In some instances, a user might be sedentary the entire time and so the other labels won't appear. When a graph contains at least 2 labels, the colors are correct. But when it contains a single label, then the color of that single label can be wrong. I believe there might be an ordering component to trigger this issue.

    In terms of the actual API usage, my usage looks something like this:

    val plotData: Map<String, List<Any>> = buildMap<String, List<Any>> {
        put(LABELS, data.map { it.label })
    
        val groups = data.map { it.label }.group()
        put(GROUPS, groups)
    
        put(X, data.map { it.x })
        put(Y, data.map { it.y })
    }
    
    val plot = letsPlot(
        plotData
    ) + geomLine(showLegend = true) {
        x = X
        y = Y
        group = GROUPS
        color = asDiscrete(LABELS, order = 1)
    } + ggtitle(
        title
    ) + ylab(
        yAxisLabel
    ) + scaleXDateTime() + scaleColorManual(
        values = labelColors.map { it.color },
        labels = labelColors.map { it.label }
    )
    
    documentation 
    opened by ccjernigan 7
  • Plots not showing in SciView when remote debugging

    Plots not showing in SciView when remote debugging

    I have previously used lets-plot with my local interpreter in Scientific Mode with no problem. Switching to a remote interpreter lets-plot stopped working and my plots wont show up in SciView. Here are my system info:

    PyCharm 2020.0.3.3 lets-plot python package 2.0.0 Lets-Plot in SciView plugin 1.0.9.202

    opened by mirbagheri 7
  • Is there a way to use the standard ggplot theme with lets-plot?

    Is there a way to use the standard ggplot theme with lets-plot?

    Hi, Is there a way to achieve the standard ggplot theme with lets-plot plots? Perhaps something similar to sns.set()? I didn't find anything in the docs but maybe I missed it.

    enhancement 
    opened by prasoon2211 7
  • Rendering is broken inside Databricks with DBR 11.x and higher - potential fix included

    Rendering is broken inside Databricks with DBR 11.x and higher - potential fix included

    Hello,

    lets-plot used to work on Databricks with DBR 10.x (cluster version) and lower and we have customers who love and use it.

    However, with DBR 11.x the auto-renderer breaks because it detects the wrong display type. To fix this, customers have to explicitly do LetsPlot.setup_html(isolated_frame=True) because isolated_frame is auto-detected to be False. IMO most likely as part of _detect_isolated_frame.

    Databricks can be detected e.g. via "databricks" in str(os.environ) which might be added to https://github1s.com/JetBrains/lets-plot/blob/HEAD/python-package/lets_plot/frontend_context/_html_contexts.py#L68-L69 or similar.

    What do you think?

    opened by fwetdb 6
  • Is kotlin-reflect really needed for lets-plot?

    Is kotlin-reflect really needed for lets-plot?

    I'm about to add lets-plot charts to Apache JMeter, and it turns out kotlin-reflect-1.5.21.jar consumes 3 megabytes (~18% of the new jars).

    Could kotlin-reflect dependency be avoided in lets-plot?

    Just for reference, here's the list of all the jars Kotlin + lets-plot brings:

        54852334 => 71166807 bytes (+16314473 bytes)
        99 => 134 files (+35)
    
      +   17536 annotations-13.0.jar
      -   18538 annotations-16.0.2.jar
      +  507197 base-portable-jvm-2.1.0.jar
      +  485809 batik-anim-1.14.jar
      +  424624 batik-awt-util-1.14.jar
      +  703757 batik-bridge-1.14.jar
      +  112373 batik-codec-1.14.jar
      +    8433 batik-constants-1.14.jar
      +  330318 batik-css-1.14.jar
      +  184487 batik-dom-1.14.jar
      +   10238 batik-ext-1.14.jar
      +  192087 batik-gvt-1.14.jar
      +   11466 batik-i18n-1.14.jar
      +   76875 batik-parser-1.14.jar
      +   25876 batik-script-1.14.jar
      +    6663 batik-shared-resources-1.14.jar
      +  232734 batik-svg-dom-1.14.jar
      +  227514 batik-svggen-1.14.jar
      +  129300 batik-transcoder-1.14.jar
      +  127477 batik-util-1.14.jar
      +   33866 batik-xml-1.14.jar
      +   32033 kotlin-logging-jvm-2.0.5.jar
      + 2993765 kotlin-reflect-1.5.21.jar
      + 1505952 kotlin-stdlib-1.5.31.jar
      +  198322 kotlin-stdlib-common-1.5.31.jar
      +   22986 kotlin-stdlib-jdk7-1.5.31.jar
      +   16121 kotlin-stdlib-jdk8-1.5.31.jar
      +  792176 kotlinx-html-jvm-0.7.3.jar
      +  196707 lets-plot-batik-2.1.0.jar
      + 3593892 lets-plot-common-2.1.0.jar
      +  627895 plot-api-jvm-3.0.2.jar
      +  882509 plot-base-portable-jvm-2.1.0.jar
      +  792534 plot-builder-portable-jvm-2.1.0.jar
      +  115007 plot-common-portable-jvm-2.1.0.jar
      +  454864 plot-config-portable-jvm-2.1.0.jar
      +  173932 vis-svg-portable-jvm-2.1.0.jar
      +   85686 xml-apis-ext-1.3.04.jar
    
    opened by vlsi 6
  • Add scales argument to facet_grid and facet_wrap

    Add scales argument to facet_grid and facet_wrap

    Hi,

    I'd be nice to have the scales argument in facet_grid and facet_wrap as in R-ggplot2, where it allows to set the scaling of the x or y axes, or both, to the range of the facet rather than the range of all facets.

    Thanks!

    opened by essicolo 6
  • element_text: add support for

    element_text: add support for "angle" parameter

    https://ggplot2.tidyverse.org/reference/element.html

    See related discussion: https://github.com/JetBrains/lets-plot/discussions/611#discussioncomment-4489409


    This is mostly for rotation of axis tick labels (i.e. for axis_text, axis_text_x, axis_text_y parameters in theme).

    opened by alshan 0
  • Tooltip does not reflect ..quantile.. aesthetic change

    Tooltip does not reflect ..quantile.. aesthetic change

    Example:

    data = {
        "x": [0, 1, 1, 2],
        "y": [0, 0, 0, 0],
    }
    ggplot(data) + \
        geom_area_ridges(aes("x", "y", fill="..quantile..")) + \
        scale_fill_gradient(low="red", high="green")
    

    Result:

    tooltips_for_area_ridges

    opened by ASmirnov-HORIS 0
  • 'set_theme()' should accept

    'set_theme()' should accept "feature list"

    LetsPlot.set_theme(theme_bw()+flavor_solarized_dark())
    

    ValueError: Wrong option type. Expected theme but was feature-list.

    Or provide other way, perhaps:

    LetsPlot.set_flavor(flavor_solarized_dark())
    
    opened by alshan 0
  • Bad default formatting for stat variables

    Bad default formatting for stat variables

    Appears in tooltips:

    tooltips=layer_tooltips(['..prop..', '..proppct..'])) 
    
    Screenshot 2022-12-14 at 19 22 58

    The same - with annotations:

    labels=layer_labels().line('@{..count..}').line('(@{..prop..})')
    
    Screenshot 2022-12-14 at 19 27 02
    opened by OLarionova-HORIS 0
  • The scale name does not apply with `as_discrete()`

    The scale name does not apply with `as_discrete()`

    The scale name is not applied when as_discrete() is used:

    from lets_plot import *
    from lets_plot.mapping import as_discrete
    
    LetsPlot.setup_html()
    
    dat2 = dict(
        x = ["a", "a", "b"],
    )
    
    (ggplot(dat2) + 
     geom_bar(aes("x", fill=as_discrete("x"))) + 
     scale_fill_manual(name="O", values=["red", "blue"], labels=['No', 'Yes'])
    )
    

    Result: Screenshot 2022-12-14 at 17 28 49

    Expected: the legend title should contains "O"

    Notebook example: here

    opened by OLarionova-HORIS 0
Releases(v3.0.0)
  • v3.0.0(Dec 15, 2022)

    [3.0.0] - 2022-12-15

    Added

    Changed

    • [BREAKING] Dropped support for Python 3.6 as it is in the "end-of-life" of its release cycle.
    • [BREAKING] geom_livemap() itself no longer draws geometries, so the following options are no longer supported: symbol, data, mapping, map, map_join, ontop, stat, position, show_legend, sampling, tooltips. To draw point and pie markers on map, please, use the geom_point() and geom_pie() geometry layers.
    • Java/Swing platf.: Apache Batik upgraded to v.1.16 [#624], [LPK #140].
    • The default size is increased for the plot title and decreased for the caption.
    • Upgraded Kotlin version to 1.7.21 (was 1.7.20).

    Fixed

    • Themes: can't change plot background after applying a "flavor" [#623].
    • Layout: uneven left/right, top/bottom plot margins [#625].
    • A plot building error with empty data on various geoms.
    • Precision error in gradient [#634].
    • geom_livemap: wrong position when datapoints geodesic line goes close to the N.P. [#645].
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(53.23 MB)
    lets-plot.min.js(3.43 MB)
  • v2.5.1(Nov 3, 2022)

    [2.5.1] - 2022-11-03

    Added

    • geom_text(), geom_label():

      • the 'newline' character (\n) now works as line break ([#605])
      • lineheight aesthetic ([#324])
      • nudge_x, nudge_y parameters ([#324])
      • special text alignments (vjust and hjust): "inward" and "outward" ([#324])

      See: example notebook.

    • vjust parameter in position_stack() and position_fill() [#323].

      See: example notebook.

    • use_crs parameter in geom_map() and other geoms, working with GeoDataFrame

      See: example notebook.

    • geom_imshow() (former geom_image()):

    • image_matrix():

    Changed

    • geom_image() renamed to geom_imshow()

      See updated examples: image 101, Fisher's boat.

    • geom_boxplot(): default value for parameter whisker_width is 0.5.

    • Upgraded Kotlin version to 1.7.20 (was 1.6.21).

    Fixed

    • element_blank() has no effect in theme legend_title [#608].
    • geom_livemap(): add support of geom_label parameters [#601].
    • Tooltip: different formats for same aesthetic Y [#579].
    • Positioning with "constant" x/y doesn't work on axis with log10 transform [#618].
    • Positional "constant" doesn't honor axis limits [#619].
    • Parameter norm in geom_imshow().
    • Several issues leading to crush in Swing/Batik apps. Related to [discussions]
    • Text labels got trimmed occasionally, when symbols -, /, \ or | present.
    • geom_livemap() doesn't load vector tiles inside iframe with certain security policies.
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(53.02 MB)
    lets-plot.min.js(3.38 MB)
  • v2.5.0(Sep 29, 2022)

    [2.5.0] - 2022-09-29

    Added

    • New theme: theme_bw() [#554].

      See: example notebook.

    • Color schemes (flavors) applicable to existing themes:

      • flavor_darcula()
      • flavor_solarized_light()
      • flavor_solarized_dark()
      • flavor_high_contrast_light()
      • flavor_high_contrast_dark()

      See: example notebook.

    • Viridis color scales: scale_color_viridis(), scale_fill_viridis().

      See: example notebook.

    • New parameters in element_text() [#562]:

    • The 'newline' character (\n) now works as line break in axis title.

      See: example notebook.

    • Parameter whisker_width in geom_boxplot() [#549].

      See: example notebook.

    • New geometry geom_label() [#557].

      See: example notebook.

    • Auto-detection of Databricks and NextJournal environments [#602].

    • Python wheels for manylinux arm64 architecture [#581].

    Changed

    • New tooltip style after applying coord_flip() [#580].

      See: example notebook.

    • In Lets-Plot for Java/Swing, Apache Batik upgraded to v.1.15 [#604]

    Fixed

    • Density and area geoms: preserve the z-order when grouping [#552].
    • Allow to import all 'bistro' functions just by '*' [#551].
    • Boxplot, violin, crossbar: position dodge width=0.95 should be used by default [#553].
    • Tooltip is shown not for the nearest object [#574].
    • Tooltip is not displayed for the object on the plots border [#575].
    • The plot caption overlaps with the legend [#587].
    • Unclear size unit of width [#589].
    • Specify size units in docstrings [#597].
    • No tooltips for geom_boxplot with zero height [#563].
    • geom_text: wrong label alignment with hjust 0 and 1 [#592].
    • Error when using lets-plot in streamlit [#595].
    • Documentation for the breaks parameter in scales [#507].
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(52.96 MB)
    lets-plot.min.js(3.37 MB)
  • v2.4.0(Jun 20, 2022)

    [2.4.0] - 2022-06-20

    Added

    • Python 3.10 support [#505].

    • Python 3.9: a Python wheel for macOS arm64 architecture (Apple Silicon).

    • LetsPlot.set_theme() - configuring a default plot theme.

      See: example notebook.

    • Quantile-Quantile (Q-Q) plot:

      • geometries:
        • geom_qq()
        • geom_qq_line()
        • geom_qq2()
        • geom_qq2_line()
      • quick Q-Q : the qq_plot() function in the bistro module.

      See: example notebook.

    • Marginal plots: the ggmarginal() function [#200], [#384].

      See: example notebook.

    • Parameter orientation in geoms: bar, boxplot, density, histogram, freqpoly, smooth, violin.

      See: example notebook.

    • New in plot theme:

      • face parameter in element_text().

        See: example notebook.

      • panel_border parameter in theme() [#542].

        See: example notebook.

      • Tooltip theme options, new parameters in theme():

        • tooltip - tooltip rectangle options;
        • tooltip_text, tooltip_title_text - tooltip text options;
        • axis_tooltip_text, axis_tooltip_text_x, axis_tooltip_text_y - axis tooltip text options.

        See: example notebook.

    • scale_color_gradientn() and scale_fill_gradientn() functions [#504].

      See: example notebook.

    Changed

    • geom_livemap [breaking change] : symbol="point" now should be specified explicitly to enable the "livemap" layer to handle provided "point" aesthetics directly. This change doesn't affect "points" layers added via the geom_point() geometry layer.
    • New style of tooltip color marker (two sidebars with a stroke color) and symbols in legend (rectangle with a stroke instead of a slash-line).
    • New type of general tooltip for geom_boxplot: displayed under the cursor.
    • Default sampling type for geom_violin switched from systematic to pick.

    Fixed

    • geom_livemap: support of the arrow parameter in geom_segment [#131].
    • Differences in tooltip color marker for plots with and without livemap.
    • Labels out of plot when axis_text_y='blank' [#525].
    • NPE in corr_plot with null coefficients.
    • Outliers are not shown when boxplot' alpha=0.
    • Support for polars.DataFrame [#526].
    • JFX rendering issue that causes tooltips to stuck [#539].
    • Support trim parameter in density and ydensity stats [#62].
    • Unexpected point geometries on geom_livemap() [#547].
    • geom_violin: add missing parameters kernel, bw, adjust, n, fs_max to signature and docstring.
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(43.59 MB)
    lets-plot.min.js(3.28 MB)
  • v2.3.0(Mar 21, 2022)

    [2.3.0] - 2022-03-21

    Added

    • Plot subtitle and caption [#417]: subtitle parameter in ggtitle() and labs(), caption parameter in labs(), plot_subtitle and plot_caption parameters in theme().

      See: example notebook.

    • The 'newline' character (\n) now works as line break in plot title, subtitle, caption and in legend title.

      See: example notebook.

    • New in tooltip customization API:

      • The title() option defines a tooltip "title" text which will always appear above the rest of the tooltip content.
      • The 'newline' character (\n) now works as line break in tooltips.
      • Automatic word wrap: occurs when the length of a text value in tooltip exceeds the 30 characters limit.

      See: example notebook.

    • Parameter scales in facet_grid()/facet_wrap() [#451, #479].

      See: example notebook.

    • New in geom_livemap():

      • The Reset button: returns the map widget to its initial zoom/location state.
      • Parameters data_size_zoomin, const_size_zoomin: allow configuring how zooming-in of the map widget increases size of geometry objects (circles, lines etc.) on map.
      • Parameter ontop that controls z-index of the geom_livemap layer.
      • Parameter show_coord_pick_tools to show "copy location" and "draw geometry" buttons.
    • New geometries:

      • geom_violin()

      See: example notebook.

      • geom_dotplot()

      See: example notebook.

      • geom_ydotplot()

      See: example notebook.

    Changed

    • New tooltip style: rounded corners, bold label, colored marker inside the tooltip.
    • Deprecated tooltip customization API: function color() will be removed in one of the future releases.
    • 'Auto shrink': plots automatically shrink when necessary to fit width of the output (notebook) cell [#488].

    Fixed

    • LiveMap, Swing-batik: legend is not visible when overlapping map [#496].
    • CVE-2021-23792 in org.jetbrains.lets-plot:[email protected] [#497].
    • Color in tooltip does not correspond to the color of marker on map [#227].
    • tooltip on livemap: hide tooltip when the cursor is over the controls [#335].
    • Automatic detection of DateTime series [#99].
    • Fix tooltips for geom_histogram(stat='density').
    • The axis tooltip overlaps the general tooltip [#515].
    • The multi-layer tooltip detection strategy will only be used if more than one layer provides tooltips.
    • scaleColorManual Divide by Zero with 1 mapping [#506].
    • LinearBreaksHelper$Companion.computeNiceBreaks out of memory error [#105].
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(42.47 MB)
    lets-plot.min.js(3.22 MB)
  • v2.2.1(Dec 10, 2021)

    [2.2.1] - 2021-12-10

    Added

    • scale_x_time() and scale_y_time() [#468].

      See: example notebook.

    • plot_background, legend_background parameters in theme() [#485].

    • axis_ontop, axis_ontop_x, axis_ontop_y parameters in theme()

    Fixed

    • Coord system limits do not work with x/y scale with transform [#474].
    • Provide 0-23 hour formatting [#469].
    • No tooltip shown when I'm trying to add an empty line [#382].
    • coord_fixed() should adjust dimensions of "geom" panel accordingly [#478].
    • The tooltip dependence on number of factors works separately by layers [#481].
    • Tooltip on y-axis looks wrong [#393].
    • Is kotlin-reflect really needed for lets-plot? [#471].
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(41.97 MB)
    lets-plot.min.js(3.13 MB)
  • v2.2.0(Oct 29, 2021)

    [2.2.0] - 2021-10-29

    Added

    • coord_flip().

      See: example notebook.

    • Date-time formatting support:

      • tooltip format() should understand date-time format pattern [#387];
      • scale_x_datetime should apply date-time formatting to the breaks [#392].

      See: example notebook.

    • Pre-configured themes:

      • Standard ggplot2 themes: theme_grey(), theme_light(), theme_classic(), theme_minimal();
      • Other themes: theme_minimal2() - the default theme, theme_none().
    • Theme modification: more parameters were added the theme() function.

      See: example notebook.

    Note: fonts size, family and face still can not be configured.

    • corr_plot() function now also accepts pre-computed correlation coefficients. I.e. the following two expressions are equivalent:
        corr_plot(iris_df).points().labels().build()
        corr_plot(iris_df.corr()).points().labels().build()  # new
    

    Changed

    • The size of fonts on plot was slightly increased all across the board.
    • The default plot size was increased by 20%, it's now 600x400 px.
    • Deprecated API: stat_corr() and "correlation stat" will be removed in one of the future releases. Please use the corr_plot() plot builder object instead.

    Fixed

    • Ordering facets - the "order" value 0 disables facet ordering [#454].
    • Tooltips for discrete variables: add the dependence of the tooltip on the number of factors. The X-axis tooltip is always shown for discrete data.
    • map_join doesn't work when join variables with same names without mappings [#428].
    • Zoom without clipping breaks tooltips [#373].
    • Unreadable breaks on axis [#430].
    • Map rendering is broken when browser uses scaling [#450].
    • corr_plot() error for data with zero variation [#329].
    • Misleading error message [#271].
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(41.89 MB)
    lets-plot.min.js(3.11 MB)
  • v2.1.0(Aug 16, 2021)

    [2.1.0] - 2021-08-16

    Added

    • Ordering categories. New parameters in the as_discrete function:

      • order_by (string) - the name of the variable by which the ordering will be performed;
      • order (int) - the ordering direction - 1 for ascending direction and -1 for descending (default value).

      See: as_discrete.

    • Basemap tiles configuring:

      • Subdomains parameter {s} for XYZ raster tiles.
      • Solid color tiles: maptiles_solid().
      • Builtin configurations for some 3rd party maptile services. The lets_plot.tilesets module.

      See: Configuring basemap tiles.

    Changed

    • Upgraded Apach Batik version to 1.14 (was 1.12) [#398].
    • Upgraded Kotlin version to 1.5.21 (was 1.4.21)
    • Upgraded Gradle version to 7.1.1 (was 6.8.3)

    Fixed

    • geom_livemap: properly handle max_zoom pamareter in maptiles_zxy().
    • Strange looking legend for tiles [#245].
    • Need to skip "bad" values during scale transformation [#301].
    • NPE on negative value in data and scale_xxx(trans='log10') [#292].
    • Legend is broken when using scale_fill_brewer with 'trans' parameter [#284].
    • Scale breaks should be distributed evenly on 'sqrt' scale. [#407].
    • Wrong tooltip formatting when used with log10 scales [#406].
    • Bad axis labels when using both plot and layer data [#327].
    • Plot layout looks wrong [#403].
    • map_join is not working correctly when map=geocoder [#380]
    • Tooltip default formatting should not change after adding other variables to tooltip [#388].
    • Tooltip on axis: increase the font size. [#399].
    • Tooltip format for variable is not working [#401].
    • Wrong direction in colorbars (legend) [#204].
    • geom_jitter: show axis tooltips (same as geom_point) [#412].
    • Outlier tooltips: the spout sometime is too long (boxplot) [#358].
    • Faceted plot is broken by geom with "constant" aesthetics [#391].
    • Interactive maps in AWT (PyCharm plugin):
      • A memory leak in PyCharm caused by a final void dispose() method in PlotPanel.
      • When showing map in PyCharm CPU is busy all the time, even then nothing is changing on screen.
      • Click events detection.
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(40.99 MB)
    lets-plot.min.js(2.95 MB)
  • v2.0.4(Jun 9, 2021)

  • v2.0.3(Jun 2, 2021)

    [2.0.3] - 2021-06-02

    Added

    • In tooltip customization API:
      • layer_tooltips(variables) - the new parameter variables defines a list of variable names, which values will be placed line by line in the general tooltip. See: Tooltip Customization.

    Changed

    • CDN: Lets-Plot JavaScript library is now served via JSDELIVR (was CDNJS):

    https://cdn.jsdelivr.net/gh/JetBrains/[email protected]/js-package/distr/lets-plot.min.js

    Fixed

    • Removed the last dependency on bintray JCenter (commit).
    • geom_boxplot: should be possible to create boxplot without specifying x-series [#325]
    • geom_hline: graph plotted outside of coordinate plane visible part [#334]
    • Draw geometry only once if layer has no aes mapping specified [#73]
    • map: calif.housing [#140]
    • Can't build plot: "Uncaught SyntaxError: Unexpected string" in a console [#371]
    • All scales should have the 'format' parameter [#347].
    • Poor font rendering in Swing/Batik. Related to: [#364]
    • Exclude slf4j implementation from lets-plot-common [#374]
    Source code(tar.gz)
    Source code(zip)
    lets-plot.js(42.87 MB)
    lets-plot.min.js(3.34 MB)
  • v2.0.3rc2(May 28, 2021)

  • v2.0.2(Apr 14, 2021)

  • v2.0.1(Mar 17, 2021)

    [2.0.1] - 2021-03-17

    Added

    • The alpha parameter for lines [#139].
    • Tooltips for geom_segment() [#296].
    • The guides() function [#52].
    • New Java Swing plot components to enable embedding Lets-Plot charts into JVM applications.
      • See: vis-swing-common, vis-swing-batik, vis-swing-jfx modules.

    Fixed

    • Fix auto-detection of PyCharm env to enable plotting in SciView while using remote interpreter [348]
    • Fix tooltips appearing outside the specified x/y limits.
    • Clippath in accordance to the given limits [#189].
    • Treat a data as DataFrame if both data and map are GeoDataFrames [#343].
    • Removed the restriction on tooltips for small polygons [#298].
    • The x/y axis labels are derived from x/y aesthetics only [#333].
    • Merge 'theme' settings [#147].
    • Add axis tooltips for geom_bin2d.
    • Outlier tooltips for geom_ribbon().
    • Fix tooltip crosshair [#309].
    Source code(tar.gz)
    Source code(zip)
    lets-plot-2.0.1.js(42.78 MB)
    lets-plot-2.0.1.min.js(3.34 MB)
  • v2.0.1rc1(Mar 12, 2021)

  • v2.0.0(Feb 9, 2021)

    [2.0.0] - 2021-02-09

    Added

    • Python 3.9 support on all platforms.

    • facet_wrap() function [#238]

    • In facets:

      • Ascending/descending ordering of faceting values.
      • Formatting of faceting values.

      See: Facets demo

    • In tooltip customization API:

      • option color overrides the default tooltip color:
        geom_xxx(tooltips=layer_tooltips().color('red'))
        

      See: Tooltip Customization.

    • Crosshair cursor when tooltip is in fixed position specified by the anchor option.

    • Scale format parameter: formatting tick labels on X/Y axis. Supported types are number and date/time.

      Example:

      scale_x_datetime(format="%b %Y")
      scale_x_continuous(format='is {.2f}')
      

      Demo: Formatting demo

      See also: Formatting

    Changed

    • [breaking change] New Geocoding API!

      Since Lets-Plot v2.0.0 the peviouse Geocoding API is no longer working (hence we bumped the version to 2.0.0).

      The old version of the Geocoding backend remains on-line for a couple of release cycles to continue support of prior versions of Lets-Plot.

      To learn more about Geocoding API see: Geocoding.

    • The project upgraded to Kotlin v1.4.21 (was v1.4.10).

    Fixed

    • Kernel density estimate computation is too slow.
    • Serialize NaN and other special values as None (CRITICAL for the "Lets-Plot in SciView" PyCharm plugin) [#282].
    • Error in plot building: 'trans' parameter not compatible with None values in data [#287].
    • LOESS smoothing fails on small (<3) number points.
    • Facet grid truncated in jupyter [#28].
    • The reverse parameter on discrete scale with 'limits' [#303].
    • Geocoder's allow_ambiguous() doesn't prevent "ValueError: Multiple objects.." [#174].
    • Fix tooltip for overlapping objects [#230].
    • Fix duplicate values in tooltip [#280].
    • geom_histogram should not try to handle geometries in GeoDataFrame [#281].
    • Error building plot: Layer 'MAP' is not supported on Live Map. [#285].
    • Align title to the left of the plot geom area [#289].
    • Tooltip on geom_ribbon().
    Source code(tar.gz)
    Source code(zip)
Owner
JetBrains
JetBrains open source projects
JetBrains
Simple implementation of Self Organizing Maps (SOMs) with rectangular and hexagonal grid topologies

py-self-organizing-map Simple implementation of Self Organizing Maps (SOMs) with rectangular and hexagonal grid topologies. A SOM is a simple unsuperv

Jonas Grebe 1 Feb 10, 2022
A dashboard built using Plotly-Dash for interactive visualization of Dex-connected individuals across the country.

Dashboard For The DexConnect Platform of Dexterity Global Working prototype submission for internship at Dexterity Global Group. Dashboard for real ti

Yashasvi Misra 2 Jun 15, 2021
Automatic data visualization in atom with the nteract data-explorer

Data Explorer Interactively explore your data directly in atom with hydrogen! The nteract data-explorer provides automatic data visualization, so you

Ben Russert 65 Dec 01, 2022
A guide for using Bootstrap 5 classes in Dash Bootstrap Components V1

dash-bootstrap-cheatsheet This handy interactive cheatsheet makes it easy to use the Bootstrap 5 classes with your Dash app made with the latest versi

10 Dec 22, 2022
Visualizations of some specific solutions of different differential equations.

Diff_sims Visualizations of some specific solutions of different differential equations. Heat Equation in 1 Dimension (A very beautiful and elegant ex

2 Jan 13, 2022
By default, networkx has problems with drawing self-loops in graphs.

By default, networkx has problems with drawing self-loops in graphs. It makes it hard to draw a graph with self-loops or to make a nicely looking chord diagram. This repository provides some code to

Vladimir Shitov 5 Jan 06, 2022
This repository contains a streaming Dataflow pipeline written in Python with Apache Beam, reading data from PubSub.

Sample streaming Dataflow pipeline written in Python This repository contains a streaming Dataflow pipeline written in Python with Apache Beam, readin

Israel Herraiz 9 Mar 18, 2022
Visualize your pandas data with one-line code

PandasEcharts 简介 基于pandas和pyecharts的可视化工具 安装 pip 安装 $ pip install pandasecharts 源码安装 $ git clone https://github.com/gamersover/pandasecharts $ cd pand

陈华杰 2 Apr 13, 2022
YOPO is an interactive dashboard which generates various standard plots.

YOPO is an interactive dashboard which generates various standard plots.you can create various graphs and charts with a click of a button. This tool uses Dash and Flask in backend.

ADARSH C 38 Dec 20, 2022
plotly scatterplots which show molecule images on hover!

molplotly Plotly scatterplots which show molecule images on hovering over the datapoints! Required packages: pandas rdkit jupyter_dash ➡️ See example.

150 Dec 28, 2022
Create matplotlib visualizations from the command-line

MatplotCLI Create matplotlib visualizations from the command-line MatplotCLI is a simple utility to quickly create plots from the command-line, levera

Daniel Moura 46 Dec 16, 2022
Bcc2telegraf: An integration that sends ebpf-based bcc histogram metrics to telegraf daemon

bcc2telegraf bcc2telegraf is an integration that sends ebpf-based bcc histogram

Peter Bobrov 2 Feb 17, 2022
HW_02 Data visualisation task

HW_02 Data visualisation and Matplotlib practice Instructions for HW_02 Idea for data analysis As I was brainstorming ideas and running through databa

9 Dec 13, 2022
This is Pygrr PolyArt, a program used for drawing custom Polygon models for your Pygrr project!

This is Pygrr PolyArt, a program used for drawing custom Polygon models for your Pygrr project!

Isaac 4 Dec 14, 2021
Numerical methods for ordinary differential equations: Euler, Improved Euler, Runge-Kutta.

Numerical methods Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary

Aleksey Korshuk 5 Apr 29, 2022
ScisorWiz: Differential Isoform Visualizer for Long-Read RNA Sequencing Data

ScisorWiz: Vizualizer for Differential Isoform Expression README ScisorWiz is a linux-based R-package for visualizing differential isoform expression

Alexander Stein 6 Oct 04, 2022
A python script to visualise explain plans as a graph using graphviz

README Needs to be improved Prerequisites Need to have graphiz installed on the machine. Refer to https://graphviz.readthedocs.io/en/stable/manual.htm

Edward Mallia 1 Sep 28, 2021
CompleX Group Interactions (XGI) provides an ecosystem for the analysis and representation of complex systems with group interactions.

XGI CompleX Group Interactions (XGI) is a Python package for the representation, manipulation, and study of the structure, dynamics, and functions of

Complex Group Interactions 67 Dec 28, 2022
A comprehensive tutorial for plotting focal mechanism

Focal_Mechanisms_Demo A comprehensive tutorial for plotting focal mechanism "beach-balls" using the PyGMT package for Python. (Resulting map of this d

3 Dec 13, 2022
A small collection of tools made by me, that you can use to visualize atomic orbitals in both 2D and 3D in different aspects.

Orbitals in Python A small collection of tools made by me, that you can use to visualize atomic orbitals in both 2D and 3D in different aspects, and o

Prakrisht Dahiya 1 Nov 25, 2021