Closed txlouder closed 6 years ago
np.random.seed(123)
x = np.array(sorted(1000*np.random.random(10)))
y = np.linspace(0,9,10)
z = np.random.normal(size=(10,10))
yields even more puzzling y-values and white stripes, e.g., at x=600 and x=800
Thanks for reporting this.
QuadMesh
has recently been given a new data interface so it looks like there may be some issues there. I agree explicitly supplied bin edges should not be changed if possible.
Could you confirm which version you are using? Using master your example seems to come out okay @ea42gh:
That said @txlouder, I can reproduce your issue. I suspect it has something to do with the way edges and bin centers are handled so I've marked it as a bug.
Actually sorry, the exact inverse is true, I hadn't checked out master myself. @ea42gh I can reproduce your issue and @txlouder your issue seems to be resolved in master if you use the following
for i in range(len(x)): print('%20.6f %20.6f' % (x[i], qm.dimension_values(0, expanded=False)[i]))
qm['x']
behavior has seemingly changed since it was inconsistent with the way other elements behaved.
After #2237 everything mentioned in this issue is now behaving like I'd expect.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi,
QuadMesh seems to be altering/adjusting/munging the bin edges supplied. See trivial example below where I create a QuadMesh with one set of bin edges. When I subsequently read out the edges, they are a completely different set. Only the first and last bin edges are unaltered.
import numpy as np import pandas as pd import holoviews as hv
x = np.array(sorted(1000*np.random.random(10))) for i in range(len(x)): print('%20.6f' % x[i])
y = np.ones(10) z = np.ones([10,10]) qm = hv.QuadMesh((x, y, z), ['x', 'y'], ['z']) for i in range(len(x)): print('%20.6f %20.6f' % (x[i], qm['x'][i]))