<jupyter_start><jupyter_text>Plot from function defined within the Jupyter Notebook<jupyter_code>extern crate plotly;

use plotly::common::{
    ColorScale, ColorScalePalette, DashType, Fill, Font, Line, LineShape, Marker, Mode, Title,
};

use plotly::layout::{Axis, BarMode, Layout, Legend, TicksDirection};

use plotly::{Bar, NamedColor, Plot, Rgb, Rgba, Scatter};
fn scatter_plot(show: bool, x: Vec<i32>, y: Vec<i32>) {    
    
    let trace = Scatter::new(x, y).mode(Mode::Markers);
    let mut plot = Plot::new();
    
    plot.add_trace(trace);
    
    let layout = Layout::new().height(200);
    let layout = Layout::new().width(800);
    
    plot.set_layout(layout);
    plot.notebook_display();
}
let x = vec![1,2,3,4,5,6,7,8,9,10];
let y = vec![1,2,3,4,5,6,7,8,9,10];

scatter_plot(true, x , y)<jupyter_output><empty_output><jupyter_text>Plot from function defined in a .rs file<jupyter_code>// Invoke code from a .rs file

extern crate plotly;
extern crate rand_distr;
extern crate rand;

use plotly::box_plot::{BoxMean, BoxPoints};
use plotly::common::{ErrorData, ErrorType, Line, Marker, Mode, Orientation, Title};
use plotly::histogram::{Bins, Cumulative, HistFunc, HistNorm};
use plotly::layout::{Axis, BarMode, BoxMode, Layout, Margin};
use plotly::{Bar, BoxPlot, Histogram, NamedColor, Plot, Rgb, Rgba, Scatter};
use rand_distr::{Distribution, Normal, Uniform};

#[path = "/usr/app/src/statistical_charts.rs"] mod statistical_charts;
// Error Bars
// statistical_charts::basic_symmetric_error_bars(true);
// statistical_charts::asymmetric_error_bars(true);
// statistical_charts::error_bars_as_a_percentage_of_the_y_value(true);
// statistical_charts::asymmetric_error_bars_with_a_constant_offset(true);
// statistical_charts::horizontal_error_bars(true);
statistical_charts::bar_chart_with_error_bars(true);
// // Box Plots
// statistical_charts::basic_box_plot(true);
// statistical_charts::box_plot_that_displays_the_underlying_data(true);
// statistical_charts::horizontal_box_plot(true);
// statistical_charts::grouped_box_plot(true);
// statistical_charts::box_plot_styling_outliers(true);
// statistical_charts::box_plot_styling_mean_and_standard_deviation(true);
// statistical_charts::grouped_horizontal_box_plot(true);
statistical_charts::fully_styled_box_plot(true);

// // Histograms
// statistical_charts::basic_histogram(true);
// statistical_charts::horizontal_histogram(true);
// statistical_charts::overlaid_histogram(true);
statistical_charts::stacked_histograms(true);
// statistical_charts::colored_and_styled_histograms(true);
// statistical_charts::cumulative_histogram(true);
// statistical_charts::normalized_histogram(true);
// statistical_charts::specify_binning_function(true);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14088598402323893, 'fraction_numerical': 0.011619462599854757, 'mean_word_length': 7.663522012578617, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '281792', 'license': 'Apache-2.0', 'n_tokens_mistral': 984, 'n_tokens_neox': 934, 'n_words': 156, 'path': 'notebooks/example_plotly.ipynb', 'repo_name': 'felipepenha/rust-greenhouse', 'size': '2754'}