Open leogargu opened 9 years ago
Could you send me a link to your dataset?
The dataset that generated the figure above is here: https://www.dropbox.com/s/6johdg4ss4x8ljs/data.dat?dl=0 I have narrowed the issue down to this smaller subset (i.e. nan's and small values are not the problem, start=0.0, midpoint=0.730, stop=0.315): https://www.dropbox.com/s/nq456iljpys9qgm/data_simplified.dat?dl=0
could you also paste the code you use to generate the figure above?
Here it is:
import matplotlib.pyplot as plt
import numpy as np
import imp
col = imp.load_source('remappedColorMap', './chr_matplotlib.py')
#Loading data
test_data = np.loadtxt("data.dat") #data_simplified.dat
#Creating remapped color map
original_cmap = plt.get_cmap('seismic')
remapped_cmap = col.remappedColorMap(original_cmap, data=test_data)
#Plotting
test_plot = plt.imshow(test_data,cmap=remapped_cmap ,interpolation='nearest')
plt.colorbar(test_plot,orientation='vertical')
#Saving plot
plt.savefig("test_fig.png",bbox_inches='tight')
I tried out plotting your simplified data set - you can see it in this notebook.
I can't seem to find anything wrong with it. Where exactly is the issue?
In that situation, stop<midpoint, and the color map is wrong (original cmap below = 'seismic'):