()
| 4028 | |
| 4029 | |
| 4030 | def test_boxplot_marker_behavior(): |
| 4031 | plt.rcParams['lines.marker'] = 's' |
| 4032 | plt.rcParams['boxplot.flierprops.marker'] = 'o' |
| 4033 | plt.rcParams['boxplot.meanprops.marker'] = '^' |
| 4034 | fig, ax = plt.subplots() |
| 4035 | test_data = np.arange(100) |
| 4036 | test_data[-1] = 150 # a flier point |
| 4037 | bxp_handle = ax.boxplot(test_data, showmeans=True) |
| 4038 | for bxp_lines in ['whiskers', 'caps', 'boxes', 'medians']: |
| 4039 | for each_line in bxp_handle[bxp_lines]: |
| 4040 | # Ensure that the rcParams['lines.marker'] is overridden by '' |
| 4041 | assert each_line.get_marker() == '' |
| 4042 | |
| 4043 | # Ensure that markers for fliers and means aren't overridden with '' |
| 4044 | assert bxp_handle['fliers'][0].get_marker() == 'o' |
| 4045 | assert bxp_handle['means'][0].get_marker() == '^' |
| 4046 | |
| 4047 | |
| 4048 | @image_comparison(['boxplot_mod_artists_after_plotting.png'], |
nothing calls this directly
no test coverage detected
searching dependent graphs…