-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Intervals responsible for their own Patches #100
Comments
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., |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: