![]() ![]() Box ( y = yd, name = xd, boxpoints = 'all', jitter = 0.5, whiskerwidth = 0.2, fillcolor = cls, marker_size = 2, line_width = 1 ) ) fig. Figure () for xd, yd, cls in zip ( x_data, y_data, colors ): fig. Import aph_objects as go x_data = N = 50 y0 = ( 10 * np. update_layout ( xaxis = dict ( showgrid = False, zeroline = False, showticklabels = False ), yaxis = dict ( zeroline = False, gridcolor = 'white' ), paper_bgcolor = 'rgb(233,233,233)', plot_bgcolor = 'rgb(233,233,233)', ) fig. Figure ( data = ) for i in range ( int ( N ))]) # format the layout fig. # Use list comprehension to describe N boxes, each with a different colour and with different randomly generated data: fig = go. c = # Each box is represented by a dict that contains the data, the type, and the colour. # Plotly accepts any CSS color format, see e.g. Import aph_objects as go import numpy as np N = 30 # Number of boxes # generate an array of rainbow colors by fixing the saturation and lightness of the HSL # representation of colour and marching around the hue. update_layout ( title_text = "Box Plot Styling Outliers" ) fig. Box ( y =, name = "Only Whiskers", boxpoints = False, # no data points marker_color = 'rgb(9,56,125)', line_color = 'rgb(9,56,125)' )) fig. In Minitab's modified box plots, outliers are identified using asterisks.Import aph_objects as go fig = go. In this case, the IQs of 136 and 141 are greater than the upper adjacent value and are thus deemed as outliers. In general, values that fall outside of the adjacent value region are deemed outliers. ![]() Therefore, the upper adjacent value is 128, because 128 is the highest observation still inside the region defined by the upper bound of 131. Therefore, in this case, the lower adjacent value turns out to be the same as the minimum value, 68, because 68 is the lowest observation still inside the region defined by the lower bound of 67. ![]() In this example, the lower limit is calculated as \(Q1-1.5\times IQR=91-1.5(16)=67\). The adjacent values are defined as the lowest and highest observations that are still inside the region defined by the following limits: For a modified box plot, the whiskers are the lines that extend from the left and right of the box to the adjacent values. In a modified box plot, the box is drawn just as in a standard box plot, but the whiskers are defined differently. How come Minitab's box plot looks different than our box plot? Well, by default, Minitab creates what is called a modified box plot. Note, for example, that the horizontal length of the box is the interquartile range IQR, the left whisker represents the first quarter of the data, and the right whisker represents the fourth quarter of the data.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |