<jupyter_start><jupyter_text>How to create a BoxPlot   First we import magics<jupyter_code>import Magics.macro as magics<jupyter_output><empty_output><jupyter_text>Define the projection<jupyter_code>map = magics.mmap(subpage_map_projection = "cartesian",
                  subpage_x_axis_type = 'date',
                  subpage_y_axis_type = 'regular',
                  subpage_x_date_min = '2016-11-03 00:00',
                  subpage_x_date_max = '2016-11-13 12:00',
                  subpage_y_min = 10.,
                  subpage_y_max = 40.,
                  subpage_y_position = 5.)

horizontal_axis = magics.maxis(axis_orientation = "horizontal",
                               axis_type = 'date',
                               axis_grid = "on",
                               axis_grid_line_style = "solid",
                               axis_grid_thickness = 1,
                               axis_grid_colour = "grey",
                               axis_minor_tick ='on',
                               axis_minor_grid ='on',
                               axis_minor_grid_line_style = "dot",
                               axis_minor_grid_colour = "grey",
                               axis_title = 'on',
                               axis_title_text = "Time...",
                               )
vertical_axis = magics.maxis(axis_orientation = "vertical",
                               axis_grid = "on",
                               axis_grid_line_style = "solid",
                               axis_grid_thickness = 1,
                               axis_grid_colour = "grey",
                            )
title = magics.mtext(text_lines=['Setting up a Box Plot'])
magics.plot(map, horizontal_axis, vertical_axis, title)<jupyter_output><empty_output><jupyter_text>Defining the input data .. In this example we are using a 10 days temperature forecast<jupyter_code>import numpy
steps= ['2016-11-03 06:00', '2016-11-03 12:00', '2016-11-03 18:00', 
        '2016-11-04 00:00', '2016-11-04 06:00', '2016-11-04 12:00', '2016-11-04 18:00', 
        '2016-11-05 00:00', '2016-11-05 06:00', '2016-11-05 12:00', '2016-11-05 18:00', 
        '2016-11-06 00:00', '2016-11-06 06:00', '2016-11-06 12:00', '2016-11-06 18:00', 
        '2016-11-07 00:00', '2016-11-07 06:00', '2016-11-07 12:00', '2016-11-07 18:00', 
        '2016-11-08 00:00', '2016-11-08 06:00', '2016-11-08 12:00', '2016-11-08 18:00', 
        '2016-11-09 00:00', '2016-11-09 06:00', '2016-11-09 12:00', '2016-11-09 18:00', 
        '2016-11-10 00:00', '2016-11-10 06:00', '2016-11-10 12:00', '2016-11-10 18:00', 
        '2016-11-11 00:00', '2016-11-11 06:00', '2016-11-11 12:00', '2016-11-11 18:00', 
        '2016-11-12 00:00', '2016-11-12 06:00', '2016-11-12 12:00', '2016-11-12 18:00', 
        '2016-11-13 00:00']

min = numpy.array([ 20.11,  22.13,  26.13,  22.93,  20.19,  23.61,  28.19,  23.66,
        21.63,  25.32,  29.07,  23.35,  22.26,  24.88,  28.81,  23.48,
        20.83,  22.85,  26.6 ,  21.36,  19.44,  22.81,  25.14,  20.95,
        20.12,  22.74,  23.64,  20.62,  19.52,  22.31,  27.21,  21.16,
        20.55,  23.7 ,  25.92,  21.48,  20.99,  22.06,  23.51,  20.74])
max = numpy.array([ 21.87,  25.78,  30.05,  24.85,  22.42,  27.4 ,  32.44,  26.14,
        23.29,  27.8 ,  34.48,  27.21,  24.19,  28.01,  33.23,  27.4 ,
        23.6 ,  27.64,  34.16,  26.57,  22.8 ,  27.02,  35.19,  26.19,
        22.7 ,  26.97,  32.82,  25.82,  22.55,  27.33,  33.13,  26.61,
        23.21,  27.79,  34.48,  28.86,  25.17,  29.95,  34.86,  28.17])
seventyfive = [ 21.05,  24.83,  28.67,  24.32,  21.99,  26.12,  30.73,  25.27,
        22.83,  27.49,  32.76,  26.43,  23.32,  26.93,  32.07,  25.99,
        22.63,  26.83,  32.  ,  25.56,  22.21,  25.99,  31.17,  24.97,
        22.  ,  26.16,  30.79,  24.68,  21.44,  26.05,  31.51,  25.37,
        22.23,  26.93,  32.31,  25.92,  22.9 ,  27.67,  31.92,  25.75]
twentyfive = [ 20.45,  23.53,  27.29,  23.54,  21.29,  24.86,  29.28,  24.42,
        22.4 ,  26.59,  31.12,  25.42,  22.7 ,  26.09,  30.51,  25.11,
        21.91,  25.93,  29.79,  24.16,  21.57,  25.04,  28.95,  23.51,
        21.11,  25.05,  28.59,  22.86,  20.83,  24.96,  29.7 ,  23.38,
        21.27,  25.32,  29.15,  23.73,  21.73,  25.26,  27.33,  23.05]
median = [ 20.87,  24.16,  27.86,  23.75,  21.78,  25.31,  30.02,  24.81,
        22.58,  27.13,  31.76,  25.74,  23.08,  26.58,  31.54,  25.5 ,
        22.3 ,  26.35,  31.07,  24.95,  21.9 ,  25.5 ,  29.79,  24.35,
        21.48,  25.66,  29.74,  23.95,  21.11,  25.58,  30.3 ,  24.39,
        21.73,  26.18,  31.14,  24.72,  22.43,  26.75,  29.92,  24.19]



boxplot = magics.mboxplot(boxplot_date_positions=steps,
        boxplot_minimum_values = min,
        boxplot_maximum_values = max,
        boxplot_box_upper_values = seventyfive,
        boxplot_box_lower_values = twentyfive,
        boxplot_median_values = median,
        boxplot_box_width = 0.5,
        boxplot_box_colour = "navy")<jupyter_output><empty_output><jupyter_text>Then we redefine the projection to take into account the values<jupyter_code>map = magics.mmap(subpage_map_projection = "cartesian",
                  subpage_x_axis_type = 'date',
                  subpage_y_axis_type = 'regular',
                  subpage_x_date_min = steps[0],
                  subpage_x_date_max = steps[-1],
                  subpage_y_min = min.min(),
                  subpage_y_max = max.max(),
                  subpage_y_position = 5.)
magics.plot(map, horizontal_axis, vertical_axis, boxplot, title)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.15980586014740247, 'fraction_numerical': 0.23314758223979867, 'mean_word_length': 1.6801541425818882, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, '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': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '506201', 'license': 'ECL-2.0', 'n_tokens_mistral': 3055, 'n_tokens_neox': 2270, 'n_words': 428, 'path': 'notebook/boxplot.ipynb', 'repo_name': 'EduardRosert/magics', 'size': '5563'}