You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on this to allow for more flexibility in Interval shapes (multi-width Polygons, curved PathPatches) when plotting detailed graphic log / measured section data. This should also make it easy to clean up the Striplog.plot_axis method a bit. Any feedback is appreciated!
My idea at this point is to construct and return different kinds of patches based on type(self.data[width_field]):
Single numeric values create the standard Rectangle patch.
Arrays or iterables create Polygons or PathPatchs, depending on kwargs. If the array/iterable is 1D it's assumed to be evenly spaced samples between self.top and self.base. If it's a 2D array, then we take it to be an array of specific [depth, value] samples.
Dictionaries also create Polygons or PathPatchs depending on kwargs. The case I have in mind is a dataset where beds have a top_gs, a base_gs, and a (weighted) mean_gs. They have a typical "fining up" profile, so these values along with some curve kwargs can be used to fit a path through the top/base values such that interval has the correct weighted mean.
I would also add a Interval.max_field method that returns the appropriate value for whatever datatype is found, and then striplog.max_field would just be the maximum of [iv.max_field(field) for iv in self].
The text was updated successfully, but these errors were encountered:
Actually I'm torn about whether I should accept 2D arrays at all, or whether those kinds of samples should have to be specified in a dict with e.g., depths and values keys.
I'm working on this to allow for more flexibility in
Interval
shapes (multi-width Polygons, curved PathPatches) when plotting detailed graphic log / measured section data. This should also make it easy to clean up theStriplog.plot_axis
method a bit. Any feedback is appreciated!My idea at this point is to construct and return different kinds of patches based on
type(self.data[width_field])
:Single numeric values create the standard
Rectangle
patch.Arrays or iterables create
Polygon
s orPathPatch
s, depending on kwargs. If the array/iterable is 1D it's assumed to be evenly spaced samples betweenself.top
andself.base
. If it's a 2D array, then we take it to be an array of specific[depth, value]
samples.Dictionaries also create
Polygon
s orPathPatch
s depending on kwargs. The case I have in mind is a dataset where beds have atop_gs
, abase_gs
, and a (weighted)mean_gs
. They have a typical "fining up" profile, so these values along with some curve kwargs can be used to fit a path through the top/base values such that interval has the correct weighted mean.I would also add a
Interval.max_field
method that returns the appropriate value for whatever datatype is found, and thenstriplog.max_field
would just be the maximum of[iv.max_field(field) for iv in self]
.The text was updated successfully, but these errors were encountered: