agilescientific / welly

Welly helps with well loading, wireline logs, log quality, data science
https://code.agilescientific.com/welly
Apache License 2.0
312 stars 132 forks source link

`plot_2d` is broken #182

Open kwinkunks opened 2 years ago

kwinkunks commented 2 years ago

image

patrick-reinhard commented 2 years ago

Could you share the reproduction steps of this bug, which file is this? What is the expected output?

If I run tests/test_curve_2d_plot() I get:

image

And if I load P-129_out.LAS, select 'GR' and run:

curve.plot_2d(cmap='viridis', curve=True, lw=0.3, edgecolor='k')

I get:

image

kwinkunks commented 2 years ago

Hm, good point -- and I didn't notice that I was plotting (200 - gr) there. Still, seems like the second plot here should produce something:

w = Well.from_las('data/P-129_out.LAS')
gr = w.data['GR']

# This works:
gr.plot_2d(cmap='viridis', curve=True, lw=0.3, edgecolor='k')

# This doesn't:
(200 - gr).plot_2d(cmap='viridis', curve=True, lw=0.3, edgecolor='k')
patrick-reinhard commented 2 years ago

This also happens in 0.4.10, it has to do with the position when clipping the imshow :

image.

The extend of the imshow needs to be from min(curve_data) up to max(curve_data) when plot_curve = True. I've created a PR with a fix.

ThomasMGeo commented 2 years ago

welly_2d_lineplot

Getting some other funny plot2d issues, this is version 4.10

patrick-reinhard commented 2 years ago

@ThomasMGeo could you share a the reproduction steps that lead you to this error?