<jupyter_start><jupyter_text>1D DistributionsSome plots visualize a transformation of the original data set. Use a `stat` parameter to choose a common transformation to visualize.Each stat creates additional variables to map aesthetics to. These variables use a common `..name..` syntax.Look at the examples of 1D distributions below.<jupyter_code>import pandas as pd

from lets_plot import *
LetsPlot.setup_html()
df = pd.read_csv('https://raw.githubusercontent.com/JetBrains/lets-plot-docs/master/data/mpg.csv')
p = ggplot(df, aes(x='hwy'))
p11 = p + geom_histogram() + ggtitle('geom_histogram(): stat="bin" (default)')
p12 = p + geom_histogram(stat='density') + ggtitle('geom_histogram(): stat="density"')
p21 = p + geom_density(stat='bin') + ggtitle('geom_density(): stat="bin"')
p22 = p + geom_density() + ggtitle('geom_density(): stat="density" (default)')

w, h = 400, 300
bunch = GGBunch()
bunch.add_plot(p11, 0, 0, w, h)
bunch.add_plot(p12, w, 0, w, h)
bunch.add_plot(p21, 0, h, w, h)
bunch.add_plot(p22, w, h, w, h)
bunch
p = ggplot(df, aes(x='fl'))
p1 = p + geom_bar() + ggtitle('geom_bar(): stat="count" (default)')
p2 = p + geom_density(stat='count') + ggtitle('geom_density(): stat="count"')

w, h = 400, 300
bunch = GGBunch()
bunch.add_plot(p1, 0, 0, w, h)
bunch.add_plot(p2, w, 0, w, h)
bunch<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.16666666666666666, 'fraction_numerical': 0.030642750373692077, 'mean_word_length': 5.902061855670103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '54441', 'license': 'MIT', 'n_tokens_mistral': 559, 'n_tokens_neox': 516, 'n_words': 136, 'path': 'source/examples/basics/gog/1d_distributions.ipynb', 'repo_name': 'ASmirnov-HORIS/lets-plot-docs', 'size': '1338'}