diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14840772..c52e2db9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -102,7 +102,7 @@ jobs: ndarray, scientific_charts, shapes, - subplots, + subplots, ] runs-on: ubuntu-latest steps: @@ -123,3 +123,22 @@ jobs: with: targets: wasm32-unknown-unknown - run: cd ${{ github.workspace }}/examples/wasm-yew/${{ matrix.example }} && cargo build --target wasm32-unknown-unknown + + build_book: + name: Build Book + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo install mdbook --no-default-features --features search --vers "^0.4" --locked --quiet + - name: Build examples to generate needed html files + run: | + cd ${{ github.workspace }}/examples/basic_charts && cargo run + cd ${{ github.workspace }}/examples/statistical_charts && cargo run + cd ${{ github.workspace }}/examples/scientific_charts && cargo run + cd ${{ github.workspace }}/examples/financial_charts && cargo run + cd ${{ github.workspace }}/examples/3d_charts && cargo run + cd ${{ github.workspace }}/examples/subplots && cargo run + cd ${{ github.workspace }}/examples/shapes && cargo run + - name: Build book + run: mdbook build docs/book \ No newline at end of file diff --git a/docs/book/src/fundamentals/shapes.md b/docs/book/src/fundamentals/shapes.md index 04314a53..e08073d7 100644 --- a/docs/book/src/fundamentals/shapes.md +++ b/docs/book/src/fundamentals/shapes.md @@ -24,7 +24,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:filled_area_chart}} ``` -{{#include ../../../../examples/shapes/out/filled_area_chart.html}} +{{#include ../../../../examples/shapes/output/inline_filled_area_chart.html}} ## Vertical and Horizontal Lines Positioned Relative to Axes @@ -32,7 +32,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:vertical_and_horizontal_lines_positioned_relative_to_axes}} ``` -{{#include ../../../../examples/shapes/out/vertical_and_horizontal_lines_positioned_relative_to_axes.html}} +{{#include ../../../../examples/shapes/output/inline_vertical_and_horizontal_lines_positioned_relative_to_axes.html}} ## Lines Positioned Relative to the Plot and to the Axes @@ -40,7 +40,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:lines_positioned_relative_to_the_plot_and_to_the_axes}} ``` -{{#include ../../../../examples/shapes/out/lines_positioned_relative_to_the_plot_and_to_the_axes.html}} +{{#include ../../../../examples/shapes/output/inline_lines_positioned_relative_to_the_plot_and_to_the_axes.html}} ## Creating Tangent Lines with Shapes @@ -48,7 +48,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:creating_tangent_lines_with_shapes}} ``` -{{#include ../../../../examples/shapes/out/creating_tangent_lines_with_shapes.html}} +{{#include ../../../../examples/shapes/output/inline_creating_tangent_lines_with_shapes.html}} ## Rectangles Positioned Relative to the Axes @@ -56,7 +56,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:rectangles_positioned_relative_to_the_axes}} ``` -{{#include ../../../../examples/shapes/out/rectangles_positioned_relative_to_the_axes.html}} +{{#include ../../../../examples/shapes/output/inline_rectangles_positioned_relative_to_the_axes.html}} ## Rectangle Positioned Relative to the Plot and to the Axes @@ -64,7 +64,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:rectangle_positioned_relative_to_the_plot_and_to_the_axes}} ``` -{{#include ../../../../examples/shapes/out/rectangle_positioned_relative_to_the_plot_and_to_the_axes.html}} +{{#include ../../../../examples/shapes/output/inline_rectangle_positioned_relative_to_the_plot_and_to_the_axes.html}} ## Highlighting Time Series Regions with Rectangle Shapes @@ -72,7 +72,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:highlighting_time_series_regions_with_rectangle_shapes}} ``` -{{#include ../../../../examples/shapes/out/highlighting_time_series_regions_with_rectangle_shapes.html}} +{{#include ../../../../examples/shapes/output/inline_highlighting_time_series_regions_with_rectangle_shapes.html}} ## Circles Positioned Relative to the Axes @@ -80,7 +80,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:circles_positioned_relative_to_the_axes}} ``` -{{#include ../../../../examples/shapes/out/circles_positioned_relative_to_the_axes.html}} +{{#include ../../../../examples/shapes/output/inline_circles_positioned_relative_to_the_axes.html}} ## Highlighting Clusters of Scatter Points with Circle Shapes @@ -88,7 +88,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:highlighting_clusters_of_scatter_points_with_circle_shapes}} ``` -{{#include ../../../../examples/shapes/out/highlighting_clusters_of_scatter_points_with_circle_shapes.html}} +{{#include ../../../../examples/shapes/output/inline_highlighting_clusters_of_scatter_points_with_circle_shapes.html}} ## Venn Diagram with Circle Shapes @@ -96,7 +96,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:venn_diagram_with_circle_shapes}} ``` -{{#include ../../../../examples/shapes/out/venn_diagram_with_circle_shapes.html}} +{{#include ../../../../examples/shapes/output/inline_venn_diagram_with_circle_shapes.html}} ## Adding Shapes to Subplots @@ -104,7 +104,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:adding_shapes_to_subplots}} ``` -{{#include ../../../../examples/shapes/out/adding_shapes_to_subplots.html}} +{{#include ../../../../examples/shapes/output/inline_adding_shapes_to_subplots.html}} ## SVG Paths @@ -112,4 +112,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../examples/shapes/src/main.rs:svg_paths}} ``` -{{#include ../../../../examples/shapes/out/svg_paths.html}} +{{#include ../../../../examples/shapes/output/inline_svg_paths.html}} diff --git a/docs/book/src/recipes/3dcharts/3dcharts.md b/docs/book/src/recipes/3dcharts/3dcharts.md index 4875c9c9..2b0bf1a3 100644 --- a/docs/book/src/recipes/3dcharts/3dcharts.md +++ b/docs/book/src/recipes/3dcharts/3dcharts.md @@ -19,4 +19,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/3d_charts/src/main.rs:simple_scatter3d_plot}} ``` -{{#include ../../../../../examples/3d_charts/out/simple_scatter3d_plot.html}} \ No newline at end of file +{{#include ../../../../../examples/3d_charts/output/inline_simple_scatter3d_plot.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/basic_charts/bar_charts.md b/docs/book/src/recipes/basic_charts/bar_charts.md index 32c0d276..f4a0fd3e 100644 --- a/docs/book/src/recipes/basic_charts/bar_charts.md +++ b/docs/book/src/recipes/basic_charts/bar_charts.md @@ -20,18 +20,18 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:basic_bar_chart}} ``` -{{#include ../../../../../examples/basic_charts/out/basic_bar_chart.html}} +{{#include ../../../../../examples/basic_charts/output/inline_basic_bar_chart.html}} ## Grouped Bar Chart ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:grouped_bar_chart}} ``` -{{#include ../../../../../examples/basic_charts/out/grouped_bar_chart.html}} +{{#include ../../../../../examples/basic_charts/output/inline_grouped_bar_chart.html}} ## Stacked Bar Chart ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:stacked_bar_chart}} ``` -{{#include ../../../../../examples/basic_charts/out/stacked_bar_chart.html}} +{{#include ../../../../../examples/basic_charts/output/inline_stacked_bar_chart.html}} diff --git a/docs/book/src/recipes/basic_charts/line_charts.md b/docs/book/src/recipes/basic_charts/line_charts.md index 1035d9f0..47911eb6 100644 --- a/docs/book/src/recipes/basic_charts/line_charts.md +++ b/docs/book/src/recipes/basic_charts/line_charts.md @@ -20,7 +20,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:adding_names_to_line_and_scatter_plot}} ``` -{{#include ../../../../../examples/basic_charts/out/adding_names_to_line_and_scatter_plot.html}} +{{#include ../../../../../examples/basic_charts/output/inline_adding_names_to_line_and_scatter_plot.html}} ## Line and Scatter Styling @@ -28,32 +28,32 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:line_and_scatter_styling}} ``` -{{#include ../../../../../examples/basic_charts/out/line_and_scatter_styling.html}} +{{#include ../../../../../examples/basic_charts/output/inline_line_and_scatter_styling.html}} ## Styling Line Plot ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:styling_line_plot}} ``` -{{#include ../../../../../examples/basic_charts/out/styling_line_plot.html}} +{{#include ../../../../../examples/basic_charts/output/inline_styling_line_plot.html}} ## Line Shape Options for Interpolation ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:line_shape_options_for_interpolation}} ``` -{{#include ../../../../../examples/basic_charts/out/line_shape_options_for_interpolation.html}} +{{#include ../../../../../examples/basic_charts/output/inline_line_shape_options_for_interpolation.html}} ## Line Dash ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:line_dash}} ``` -{{#include ../../../../../examples/basic_charts/out/line_dash.html}} +{{#include ../../../../../examples/basic_charts/output/inline_line_dash.html}} ## Filled Lines ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:filled_lines}} ``` -{{#include ../../../../../examples/basic_charts/out/filled_lines.html}} \ No newline at end of file +{{#include ../../../../../examples/basic_charts/output/inline_filled_lines.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/basic_charts/pie_charts.md b/docs/book/src/recipes/basic_charts/pie_charts.md index bb17de49..5f5657cd 100644 --- a/docs/book/src/recipes/basic_charts/pie_charts.md +++ b/docs/book/src/recipes/basic_charts/pie_charts.md @@ -18,24 +18,24 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:basic_pie_chart}} ``` -{{#include ../../../../../examples/basic_charts/out/basic_pie_chart.html}} +{{#include ../../../../../examples/basic_charts/output/inline_basic_pie_chart.html}} ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:basic_pie_chart_labels}} ``` -{{#include ../../../../../examples/basic_charts/out/basic_pie_chart_labels.html}} +{{#include ../../../../../examples/basic_charts/output/inline_basic_pie_chart_labels.html}} ## Grouped Pie Chart ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:grouped_donout_pie_charts}} ``` -{{#include ../../../../../examples/basic_charts/out/grouped_donout_pie_charts.html}} +{{#include ../../../../../examples/basic_charts/output/inline_grouped_donout_pie_charts.html}} ## Pie Chart Text Control ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:pie_chart_text_control}} ``` -{{#include ../../../../../examples/basic_charts/out/pie_chart_text_control.html}} \ No newline at end of file +{{#include ../../../../../examples/basic_charts/output/inline_pie_chart_text_control.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/basic_charts/scatter_plots.md b/docs/book/src/recipes/basic_charts/scatter_plots.md index 14838d1d..2d920768 100644 --- a/docs/book/src/recipes/basic_charts/scatter_plots.md +++ b/docs/book/src/recipes/basic_charts/scatter_plots.md @@ -19,7 +19,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:simple_scatter_plot}} ``` -{{#include ../../../../../examples/basic_charts/out/simple_scatter_plot.html}} +{{#include ../../../../../examples/basic_charts/output/inline_simple_scatter_plot.html}} ## Line and Scatter Plots @@ -27,14 +27,14 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:line_and_scatter_plots}} ``` -{{#include ../../../../../examples/basic_charts/out/line_and_scatter_plots.html}} +{{#include ../../../../../examples/basic_charts/output/inline_line_and_scatter_plots.html}} ## Bubble Scatter Plots ```rust,no_run {{#include ../../../../../examples/basic_charts/src/main.rs:bubble_scatter_plots}} ``` -{{#include ../../../../../examples/basic_charts/out/bubble_scatter_plots.html}} +{{#include ../../../../../examples/basic_charts/output/inline_bubble_scatter_plots.html}} ## Data Labels Hover @@ -42,7 +42,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:data_labels_hover}} ``` -{{#include ../../../../../examples/basic_charts/out/data_labels_hover.html}} +{{#include ../../../../../examples/basic_charts/output/inline_data_labels_hover.html}} ## Data Labels on the Plot @@ -50,7 +50,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:data_labels_on_the_plot}} ``` -{{#include ../../../../../examples/basic_charts/out/data_labels_on_the_plot.html}} +{{#include ../../../../../examples/basic_charts/output/inline_data_labels_on_the_plot.html}} ## Colored and Styled Scatter Plot @@ -58,7 +58,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:colored_and_styled_scatter_plot}} ``` -{{#include ../../../../../examples/basic_charts/out/colored_and_styled_scatter_plot.html}} +{{#include ../../../../../examples/basic_charts/output/inline_colored_and_styled_scatter_plot.html}} ## Large Data Sets @@ -66,4 +66,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/basic_charts/src/main.rs:large_data_sets}} ``` -{{#include ../../../../../examples/basic_charts/out/large_data_sets.html}} \ No newline at end of file +{{#include ../../../../../examples/basic_charts/output/inline_large_data_sets.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/financial_charts/candlestick_charts.md b/docs/book/src/recipes/financial_charts/candlestick_charts.md index 0b59ea0f..62c5f16e 100644 --- a/docs/book/src/recipes/financial_charts/candlestick_charts.md +++ b/docs/book/src/recipes/financial_charts/candlestick_charts.md @@ -18,4 +18,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:simple_candlestick_chart}} ``` -{{#include ../../../../../examples/financial_charts/out/simple_candlestick_chart.html}} \ No newline at end of file +{{#include ../../../../../examples/financial_charts/output/inline_simple_candlestick_chart.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/financial_charts/ohlc_charts.md b/docs/book/src/recipes/financial_charts/ohlc_charts.md index 7146b0e5..ef4fb281 100644 --- a/docs/book/src/recipes/financial_charts/ohlc_charts.md +++ b/docs/book/src/recipes/financial_charts/ohlc_charts.md @@ -18,4 +18,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:simple_ohlc_chart}} ``` -{{#include ../../../../../examples/financial_charts/out/simple_ohlc_chart.html}} \ No newline at end of file +{{#include ../../../../../examples/financial_charts/output/inline_simple_ohlc_chart.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/financial_charts/time_series_and_date_axes.md b/docs/book/src/recipes/financial_charts/time_series_and_date_axes.md index 580976e9..412c0566 100644 --- a/docs/book/src/recipes/financial_charts/time_series_and_date_axes.md +++ b/docs/book/src/recipes/financial_charts/time_series_and_date_axes.md @@ -18,7 +18,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:time_series_plot_with_custom_date_range}} ``` -{{#include ../../../../../examples/financial_charts/out/time_series_plot_with_custom_date_range.html}} +{{#include ../../../../../examples/financial_charts/output/inline_time_series_plot_with_custom_date_range.html}} ## Time Series with Range Slider @@ -26,7 +26,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:time_series_with_range_slider}} ``` -{{#include ../../../../../examples/financial_charts/out/time_series_with_range_slider.html}} +{{#include ../../../../../examples/financial_charts/output/inline_time_series_with_range_slider.html}} ## Time Series with Range Selector Buttons @@ -34,7 +34,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:time_series_with_range_selector_buttons}} ``` -{{#include ../../../../../examples/financial_charts/out/time_series_with_range_selector_buttons.html}} +{{#include ../../../../../examples/financial_charts/output/inline_time_series_with_range_selector_buttons.html}} ## Customizing Tick Label Formatting by Zoom Level @@ -42,4 +42,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/financial_charts/src/main.rs:customizing_tick_label_formatting_by_zoom_level}} ``` -{{#include ../../../../../examples/financial_charts/out/customizing_tick_label_formatting_by_zoom_level.html}} \ No newline at end of file +{{#include ../../../../../examples/financial_charts/output/inline_customizing_tick_label_formatting_by_zoom_level.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/scientific_charts/contour_plots.md b/docs/book/src/recipes/scientific_charts/contour_plots.md index 0f878d28..78a61ffc 100644 --- a/docs/book/src/recipes/scientific_charts/contour_plots.md +++ b/docs/book/src/recipes/scientific_charts/contour_plots.md @@ -16,7 +16,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/scientific_charts/src/main.rs:simple_contour_plot}} ``` -{{#include ../../../../../examples/scientific_charts/out/simple_contour_plot.html}} +{{#include ../../../../../examples/scientific_charts/output/inline_simple_contour_plot.html}} ## Colorscale for Contour Plot @@ -24,7 +24,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/scientific_charts/src/main.rs:colorscale_for_contour_plot}} ``` -{{#include ../../../../../examples/scientific_charts/out/colorscale_for_contour_plot.html}} +{{#include ../../../../../examples/scientific_charts/output/inline_colorscale_for_contour_plot.html}} ## Customizing Size and Range of a Contour Plot Contours @@ -32,7 +32,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/scientific_charts/src/main.rs:customizing_size_and_range_of_a_contour_plots_contours}} ``` -{{#include ../../../../../examples/scientific_charts/out/customizing_size_and_range_of_a_contour_plots_contours.html}} +{{#include ../../../../../examples/scientific_charts/output/inline_customizing_size_and_range_of_a_contour_plots_contours.html}} ## Customizing Spacing Between X and Y Ticks @@ -40,4 +40,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/scientific_charts/src/main.rs:customizing_spacing_between_x_and_y_ticks}} ``` -{{#include ../../../../../examples/scientific_charts/out/customizing_spacing_between_x_and_y_ticks.html}} \ No newline at end of file +{{#include ../../../../../examples/scientific_charts/output/inline_customizing_spacing_between_x_and_y_ticks.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/scientific_charts/heatmaps.md b/docs/book/src/recipes/scientific_charts/heatmaps.md index 00d3ef84..aa8ff4ef 100644 --- a/docs/book/src/recipes/scientific_charts/heatmaps.md +++ b/docs/book/src/recipes/scientific_charts/heatmaps.md @@ -16,4 +16,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/scientific_charts/src/main.rs:basic_heat_map}} ``` -{{#include ../../../../../examples/scientific_charts/out/basic_heat_map.html}} \ No newline at end of file +{{#include ../../../../../examples/scientific_charts/output/inline_basic_heat_map.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/statistical_charts/box_plots.md b/docs/book/src/recipes/statistical_charts/box_plots.md index 25bfdde5..82a52b8b 100644 --- a/docs/book/src/recipes/statistical_charts/box_plots.md +++ b/docs/book/src/recipes/statistical_charts/box_plots.md @@ -21,7 +21,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:basic_box_plot}} ``` -{{#include ../../../../../examples/statistical_charts/out/basic_box_plot.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_basic_box_plot.html}} ## Box Plot that Displays the Underlying Data @@ -29,7 +29,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:box_plot_that_displays_the_underlying_data}} ``` -{{#include ../../../../../examples/statistical_charts/out/box_plot_that_displays_the_underlying_data.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_box_plot_that_displays_the_underlying_data.html}} ## Horizontal Box Plot @@ -37,7 +37,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:horizontal_box_plot}} ``` -{{#include ../../../../../examples/statistical_charts/out/horizontal_box_plot.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_horizontal_box_plot.html}} ## Grouped Box Plot @@ -45,7 +45,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:grouped_box_plot}} ``` -{{#include ../../../../../examples/statistical_charts/out/grouped_box_plot.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_grouped_box_plot.html}} ## Box Plot Styling Outliers @@ -53,7 +53,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:box_plot_styling_outliers}} ``` -{{#include ../../../../../examples/statistical_charts/out/box_plot_styling_outliers.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_box_plot_styling_outliers.html}} ## Box Plot Styling Mean and Standard Deviation @@ -61,7 +61,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:box_plot_styling_mean_and_standard_deviation}} ``` -{{#include ../../../../../examples/statistical_charts/out/box_plot_styling_mean_and_standard_deviation.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_box_plot_styling_mean_and_standard_deviation.html}} ## Grouped Horizontal Box Plot @@ -69,7 +69,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:grouped_horizontal_box_plot}} ``` -{{#include ../../../../../examples/statistical_charts/out/grouped_horizontal_box_plot.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_grouped_horizontal_box_plot.html}} ## Fully Styled Box Plot @@ -77,4 +77,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:fully_styled_box_plot}} ``` -{{#include ../../../../../examples/statistical_charts/out/fully_styled_box_plot.html}} \ No newline at end of file +{{#include ../../../../../examples/statistical_charts/output/inline_fully_styled_box_plot.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/statistical_charts/error_bars.md b/docs/book/src/recipes/statistical_charts/error_bars.md index 96024017..4a7dd38c 100644 --- a/docs/book/src/recipes/statistical_charts/error_bars.md +++ b/docs/book/src/recipes/statistical_charts/error_bars.md @@ -20,21 +20,21 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:basic_symmetric_error_bars}} ``` -{{#include ../../../../../examples/statistical_charts/out/basic_symmetric_error_bars.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_basic_symmetric_error_bars.html}} ## Asymmetric Error Bars ```rust,no_run {{#include ../../../../../examples/statistical_charts/src/main.rs:asymmetric_error_bars}} ``` -{{#include ../../../../../examples/statistical_charts/out/asymmetric_error_bars.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_asymmetric_error_bars.html}} ## Error Bars as a Percentage of the Y Value ```rust,no_run {{#include ../../../../../examples/statistical_charts/src/main.rs:error_bars_as_a_percentage_of_the_y_value}} ``` -{{#include ../../../../../examples/statistical_charts/out/error_bars_as_a_percentage_of_the_y_value.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_error_bars_as_a_percentage_of_the_y_value.html}} ## Asymmetric Error Bars with a Constant Offset @@ -42,7 +42,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:asymmetric_error_bars_with_a_constant_offset}} ``` -{{#include ../../../../../examples/statistical_charts/out/asymmetric_error_bars_with_a_constant_offset.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_asymmetric_error_bars_with_a_constant_offset.html}} ## Horizontal Error Bars @@ -50,7 +50,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:horizontal_error_bars}} ``` -{{#include ../../../../../examples/statistical_charts/out/horizontal_error_bars.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_horizontal_error_bars.html}} ## Bar Chart with Error Bars @@ -58,7 +58,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:bar_chart_with_error_bars}} ``` -{{#include ../../../../../examples/statistical_charts/out/bar_chart_with_error_bars.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_bar_chart_with_error_bars.html}} ## Colored and Styled Error Bars @@ -66,4 +66,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:colored_and_styled_error_bars}} ``` -{{#include ../../../../../examples/statistical_charts/out/colored_and_styled_error_bars.html}} \ No newline at end of file +{{#include ../../../../../examples/statistical_charts/output/inline_colored_and_styled_error_bars.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/statistical_charts/histograms.md b/docs/book/src/recipes/statistical_charts/histograms.md index 02e87855..f6728734 100644 --- a/docs/book/src/recipes/statistical_charts/histograms.md +++ b/docs/book/src/recipes/statistical_charts/histograms.md @@ -21,7 +21,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:basic_histogram}} ``` -{{#include ../../../../../examples/statistical_charts/out/basic_histogram.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_basic_histogram.html}} ## Horizontal Histogram @@ -29,14 +29,14 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:horizontal_histogram}} ``` -{{#include ../../../../../examples/statistical_charts/out/horizontal_histogram.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_horizontal_histogram.html}} ## Overlaid Histogram ```rust,no_run {{#include ../../../../../examples/statistical_charts/src/main.rs:overlaid_histogram}} ``` -{{#include ../../../../../examples/statistical_charts/out/overlaid_histogram.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_overlaid_histogram.html}} ## Stacked Histograms @@ -44,7 +44,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:stacked_histograms}} ``` -{{#include ../../../../../examples/statistical_charts/out/stacked_histograms.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_stacked_histograms.html}} ## Colored and Styled Histograms @@ -52,7 +52,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:colored_and_styled_histograms}} ``` -{{#include ../../../../../examples/statistical_charts/out/colored_and_styled_histograms.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_colored_and_styled_histograms.html}} ## Cumulative Histogram @@ -60,7 +60,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:cumulative_histogram}} ``` -{{#include ../../../../../examples/statistical_charts/out/cumulative_histogram.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_cumulative_histogram.html}} ## Normalized Histogram @@ -68,7 +68,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:normalized_histogram}} ``` -{{#include ../../../../../examples/statistical_charts/out/normalized_histogram.html}} +{{#include ../../../../../examples/statistical_charts/output/inline_normalized_histogram.html}} ## Specify Binning Function @@ -76,4 +76,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/statistical_charts/src/main.rs:specify_binning_function}} ``` -{{#include ../../../../../examples/statistical_charts/out/specify_binning_function.html}} \ No newline at end of file +{{#include ../../../../../examples/statistical_charts/output/inline_specify_binning_function.html}} \ No newline at end of file diff --git a/docs/book/src/recipes/subplots/multiple_axes.md b/docs/book/src/recipes/subplots/multiple_axes.md index 9b7641ed..49067291 100644 --- a/docs/book/src/recipes/subplots/multiple_axes.md +++ b/docs/book/src/recipes/subplots/multiple_axes.md @@ -15,7 +15,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:two_y_axes}} ``` -{{#include ../../../../../examples/subplots/out/two_y_axes.html}} +{{#include ../../../../../examples/subplots/output/inline_two_y_axes.html}} ## Multiple Axes @@ -23,4 +23,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:multiple_axes}} ``` -{{#include ../../../../../examples/subplots/out/multiple_axes.html}} +{{#include ../../../../../examples/subplots/output/inline_multiple_axes.html}} diff --git a/docs/book/src/recipes/subplots/subplots.md b/docs/book/src/recipes/subplots/subplots.md index e9da1d6a..fdfee3a3 100644 --- a/docs/book/src/recipes/subplots/subplots.md +++ b/docs/book/src/recipes/subplots/subplots.md @@ -16,7 +16,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:simple_subplot}} ``` -{{#include ../../../../../examples/subplots/out/simple_subplot.html}} +{{#include ../../../../../examples/subplots/output/inline_simple_subplot.html}} ## Custom Sized Subplot @@ -24,7 +24,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:custom_sized_subplot}} ``` -{{#include ../../../../../examples/subplots/out/custom_sized_subplot.html}} +{{#include ../../../../../examples/subplots/output/inline_custom_sized_subplot.html}} ## Multiple Subplots @@ -32,7 +32,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:multiple_subplots}} ``` -{{#include ../../../../../examples/subplots/out/multiple_subplots.html}} +{{#include ../../../../../examples/subplots/output/inline_multiple_subplots.html}} ## Stacked Subplots @@ -40,7 +40,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:stacked_subplots}} ``` -{{#include ../../../../../examples/subplots/out/stacked_subplots.html}} +{{#include ../../../../../examples/subplots/output/inline_stacked_subplots.html}} ## Stacked Subplots with Shared X Axis @@ -48,7 +48,7 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:stacked_subplots_with_shared_x_axis}} ``` -{{#include ../../../../../examples/subplots/out/stacked_subplots_with_shared_x_axis.html}} +{{#include ../../../../../examples/subplots/output/inline_stacked_subplots_with_shared_x_axis.html}} ## Multiple Custom Sized Subplots @@ -56,4 +56,4 @@ The `to_inline_html` method is used to produce the html plot displayed in this p {{#include ../../../../../examples/subplots/src/main.rs:multiple_custom_sized_subplots}} ``` -{{#include ../../../../../examples/subplots/out/multiple_custom_sized_subplots.html}} \ No newline at end of file +{{#include ../../../../../examples/subplots/output/inline_multiple_custom_sized_subplots.html}} \ No newline at end of file diff --git a/examples/3d_charts/src/main.rs b/examples/3d_charts/src/main.rs index 3ecd6926..30e57baf 100644 --- a/examples/3d_charts/src/main.rs +++ b/examples/3d_charts/src/main.rs @@ -261,6 +261,11 @@ fn colorscale_plot(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/basic_charts/src/main.rs b/examples/basic_charts/src/main.rs index b3b4fefa..c36dcd70 100644 --- a/examples/basic_charts/src/main.rs +++ b/examples/basic_charts/src/main.rs @@ -960,6 +960,11 @@ fn grouped_donout_pie_charts(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/custom_controls/src/main.rs b/examples/custom_controls/src/main.rs index b3e21e50..d243a640 100644 --- a/examples/custom_controls/src/main.rs +++ b/examples/custom_controls/src/main.rs @@ -119,6 +119,11 @@ fn bar_chart_with_modifiable_bar_mode(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/customization/src/main.rs b/examples/customization/src/main.rs index 456df549..f8b55e62 100644 --- a/examples/customization/src/main.rs +++ b/examples/customization/src/main.rs @@ -48,7 +48,7 @@ fn multiple_plots_on_same_html_page(show: bool, file_name: &str) { .to_html_string(); std::fs::create_dir_all("./output").unwrap(); - let path = format!("./output/{}.html", file_name); + let path = format!("./output/inline_{}.html", file_name); let mut file = File::create(&path).unwrap(); file.write_all(html.as_bytes()) .expect("failed to write html output"); @@ -132,6 +132,11 @@ fn show_with_default_app(temp_path: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/financial_charts/src/main.rs b/examples/financial_charts/src/main.rs index 745a58e6..d893b074 100644 --- a/examples/financial_charts/src/main.rs +++ b/examples/financial_charts/src/main.rs @@ -321,6 +321,11 @@ fn simple_ohlc_chart(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/images/src/main.rs b/examples/images/src/main.rs index 3984f7b4..f290e256 100644 --- a/examples/images/src/main.rs +++ b/examples/images/src/main.rs @@ -104,6 +104,11 @@ fn trace_from_ndarray_rgba(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path @@ -111,8 +116,8 @@ fn write_example_to_html(plot: &Plot, name: &str) -> String { fn main() { // Change false to true on any of these lines to display the example. - basic_image(true, "basic_image"); - trace_from_image_crate_rgb(true, "trace_from_image_rgb"); + basic_image(false, "basic_image"); + trace_from_image_crate_rgb(false, "trace_from_image_rgb"); trace_from_image_crate_rgba(false, "trace_from_image_rgba"); trace_from_ndarray_rgb(false, "trace_from_ndarray_rgb"); trace_from_ndarray_rgba(false, "trace_from_ndrarray_rgba"); diff --git a/examples/kaleido/src/main.rs b/examples/kaleido/src/main.rs index 48886f74..89d89d08 100644 --- a/examples/kaleido/src/main.rs +++ b/examples/kaleido/src/main.rs @@ -12,7 +12,7 @@ fn main() { let scale = 1.0; std::fs::create_dir_all("./output").unwrap(); - let filename = "./output/image".to_string(); + let filename = "./output/inline_image".to_string(); // The image will be saved to format!("output/image.{image_format}") relative to // the current working directory. diff --git a/examples/maps/src/main.rs b/examples/maps/src/main.rs index c41ab860..a286d66b 100644 --- a/examples/maps/src/main.rs +++ b/examples/maps/src/main.rs @@ -161,6 +161,11 @@ fn density_mapbox(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/ndarray/src/main.rs b/examples/ndarray/src/main.rs index e052040c..b8c3ced1 100644 --- a/examples/ndarray/src/main.rs +++ b/examples/ndarray/src/main.rs @@ -75,6 +75,11 @@ fn multiple_ndarray_traces_over_rows(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/scientific_charts/src/main.rs b/examples/scientific_charts/src/main.rs index b8d00896..bcd9718b 100644 --- a/examples/scientific_charts/src/main.rs +++ b/examples/scientific_charts/src/main.rs @@ -178,6 +178,11 @@ fn customized_heat_map(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/shapes/src/main.rs b/examples/shapes/src/main.rs index 21e05095..b9fe5a6a 100644 --- a/examples/shapes/src/main.rs +++ b/examples/shapes/src/main.rs @@ -774,6 +774,11 @@ fn svg_paths(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path @@ -794,9 +799,9 @@ fn main() { "lines_positioned_relative_to_the_plot_and_to_the_axes", ); - creating_tangent_lines_with_shapes(true, "creating_tangent_lines_with_shapes"); + creating_tangent_lines_with_shapes(false, "creating_tangent_lines_with_shapes"); - rectangles_positioned_relative_to_the_axes(true, "rectangles_positioned_relative_to_the_axes"); + rectangles_positioned_relative_to_the_axes(false, "rectangles_positioned_relative_to_the_axes"); rectangle_positioned_relative_to_the_plot_and_to_the_axes( false, diff --git a/examples/statistical_charts/src/main.rs b/examples/statistical_charts/src/main.rs index e79e44e8..07795365 100644 --- a/examples/statistical_charts/src/main.rs +++ b/examples/statistical_charts/src/main.rs @@ -693,6 +693,11 @@ fn specify_binning_function(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path diff --git a/examples/subplots/src/main.rs b/examples/subplots/src/main.rs index eb4b2b85..235ec573 100644 --- a/examples/subplots/src/main.rs +++ b/examples/subplots/src/main.rs @@ -387,6 +387,11 @@ fn many_subplots_with_titles(show: bool, file_name: &str) { fn write_example_to_html(plot: &Plot, name: &str) -> String { std::fs::create_dir_all("./output").unwrap(); + // Write inline HTML + let html = plot.to_inline_html(Some(name)); + let path = format!("./output/inline_{}.html", name); + std::fs::write(path, html).unwrap(); + // Write standalone HTML let path = format!("./output/{}.html", name); plot.write_html(&path); path