Пример #1
0
def test_patch_modification():
    fig = plt.figure()
    ax = fig.add_subplot(projection="3d")
    circle = Circle((0, 0))
    ax.add_patch(circle)
    art3d.patch_2d_to_3d(circle)
    circle.set_facecolor((1.0, 0.0, 0.0, 1))

    assert mcolors.same_color(circle.get_facecolor(), (1, 0, 0, 1))
    fig.canvas.draw()
    assert mcolors.same_color(circle.get_facecolor(), (1, 0, 0, 1))
Пример #2
0
ax_t_l.plot(ds_center_t_l,
            areas_t_l / width_t_l,
            color=_colors[0],
            linewidth=3)
ax_t_l.set_title(r'$\Gamma({:.2f}, {:.2f})$  (peak = ${:.2f}$ $\mu$m)'.format(
    k_t_l, theta_t_l, peak_t_l,
    100 * errors[list(np.round(krange, 3)).index(k_t_l),
                 list(np.round(peakrange, 3)).index(peak_t_l)]),
                 fontsize=16)
ax_t_l.set_xlim(0, xmaxplot)
ax_t_l.set_ylim(0 - minus_y_buffer, ymaxplot)
pl.xticks(fontsize=13)
pl.yticks(fontsize=13)
for axis in ['top', 'bottom', 'left', 'right']:
    ax_t_l.spines[axis].set_linewidth(3)
    ax_t_l.spines[axis].set_color(cc_t_l.get_facecolor())

## bottom left
ax_b_l = pl.subplot(gs[1, 0])
ds_center_b_l, areas_b_l = get_gamma_binned_pdf(k_b_l,
                                                theta_b_l,
                                                maxq=qmaxplot,
                                                N=Nplot)
width_b_l = ds_center_b_l[2] - ds_center_b_l[1]
ax_b_l.bar(ds_center_b_l,
           areas_b_l / width_b_l,
           width_b_l,
           color=_colors[0],
           alpha=0.3)
ax_b_l.plot(ds_center_b_l,
            areas_b_l / width_b_l,