add ishikawa diagram to examples#26064
Conversation
| ax.set_xlim(-5, 5) | ||
| ax.set_ylim(-5, 5) | ||
| ax.axis('off') | ||
| COLOR = 'C0' |
There was a problem hiding this comment.
What about using a non-default color to make it clear your doing this so that you use a consistent color through out?
There was a problem hiding this comment.
You can use "tab:blue" to get the same color by a fixed name.
There was a problem hiding this comment.
yeah so my point is use a color that's not the matplotlib default 'cause that's gonna make it crystal clear that the point of this variable is to keep the color in sync (and the blue isn't an artifact of it being the default)
There was a problem hiding this comment.
I like keeping the default colors in the examples. This makes for a homogeneous visual impression and "brand identity". If there is a dedicated color configuration, its correct usage is implied. We don't have to choose another color just for the purpose of proving that this is properly applied.
There was a problem hiding this comment.
To be honest, I only made that variable to make it easier to experiment with different colours. I can just as easily remove it since it's only being used in 3 places.
| method = ['Method', ['Time consumption', 'Cost', 'Procedures', | ||
| 'Inefficient process', 'Sampling']] | ||
| machine = ['Machine', ['Faulty equipment', 'Compatibility']] | ||
| material = ['Material', ['Poor-quality input', 'Raw materials', 'Supplier', | ||
| 'Shortage']] | ||
| measure = ['Measurement', ['Calibration', 'Performance', 'Wrong measurements']] | ||
| env = ['Environment', ['Bad conditions']] | ||
| people = ['People', ['Lack of training', 'Managers', 'Labor shortage', | ||
| 'Procedures', 'Sales strategy']] |
There was a problem hiding this comment.
This seems like a dictionary - is there an advantage to this format?
There was a problem hiding this comment.
Indeed, you can make this a single dict (problem: list of causes) and pass it to draw_body().
There was a problem hiding this comment.
There's no advantage to it. I chose lists over a dictionary because @QuLogic disapproved of that format in the old PR.
There was a problem hiding this comment.
I have not followed the whole topic, but my impression was that the no-dict comment refers to passing all data around through all functions as dict.
A dict as the top-level structure defining the diagram is much more concise:
categories = {
'Method': ['Time consumption', 'Cost', 'Procedures', 'Inefficient process', 'Sampling'],
'Machine': ['Faulty equipment', 'Compatibility'],
'Material': ['Poor-quality input', 'Raw materials', 'Supplier', 'Shortage'],
'Measurement': ['Calibration', 'Performance', 'Wrong measurements'],
'Environment': ['Bad conditions'],
'People': ['Lack of training', 'Managers', 'Labor shortage', 'Procedures', 'Sales strategy'],
}
PR summary
Closes #25222. Adds a fishbone plot to the specialty plots example in the docs. This PR is a continuation of #25248 except the plot is different. It's a simple representation of a fishbone plot which takes the input data as a dictionary of nested lists or tuples. The diagram will scale depending on the number of arguments that are passed to it.
PR checklist