MBravoS / splotch

Simple PLOTs, Contours and Histograms is a small package with wrapper functions designed to simplify plotting calls from matplotlib.
BSD 3-Clause "New" or "Revised" License
5 stars 0 forks source link

Colorbar with log-scale colormap #42

Closed MBravoS closed 4 years ago

MBravoS commented 4 years ago

Setting clog=True in plots_2d.hist2D() and then making a colorbar for the plot using axis_func.colorbar() results in labels being displayed on top of each other on the otherwise empty size of the colorbar.

The following example works as expected:

import numpy as np import splotch as sp x=np.random.normal(0,1,1000) x=np.random.normal(0,1,1000) sp.hist2D(x,y,clog=False) sp.colorbar(height=1)

This example displays the issue:

x=np.random.normal(0,1,1000) x=np.random.normal(0,1,1000) sp.hist2D(x,y,clog=True) sp.colorbar(height=1)

AstroRobin commented 4 years ago

Fixed as of devel 0.5.0.4