Home > other >  Gradient fill from zero till a curve
Gradient fill from zero till a curve

Time:12-05

I have been using gradient fill till zero

PS: vmin in imshow can be used to remove the color range where it's very light:

grad1 = ax.imshow(np.linspace(0, 1, 256).reshape(-1, 1), cmap='Blues', vmin=-0.5, aspect='auto',
                  extent=[x.min(), x.max(), 0, y.max()], origin='lower')

grad2 = ax.imshow(np.linspace(0, 1, 256).reshape(-1, 1), cmap='Reds', vmin=-0.5, aspect='auto',
                  extent=[x.min(), x.max(), y.min(), 0], origin='upper')

gradient fill without very light colors

  • Related