-
Notifications
You must be signed in to change notification settings - Fork 855
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
Add markersize parameter to plot_decision_regions #340
Comments
That's a good point, right now, the function is indeed a bit limited when it comes to styling and customization. Instead of adding a single styling param like So, right now, we have the following three plotting functions inside
Maybe one idea would be to define 3 dictionaries (defaulting to None), E.g. for your scenario, this could be
and then inside
What do you think? |
Good point, I like the dictionary idea! I guess adding specific parameters can be a slippery slope. For example, why not add a marker edge color parameter? Or an alpha parameter? Etc. Also, passing dictionaries with plotting specific parameters is done in Thanks for the feedback, I'll work on a PR |
Sounds good :). Thanks! It would involve some extra efforts, but all the existing, fixed parameters that are being used right now should then ideally also only be used if they are not otherwise assigned by the given kwargs dictionary. Implementation-wise we would set the kwargs dictionaries to This should include arguments that come from plot_decision_regions(...
markers='s^oxv<>',
colors='red,blue,limegreen,gray,cyan'): though as they are a bit differently determined. |
I recently needed to change the scatter plot marker size in
plot_decision_regions
to make the markers easier to see in a presentation. A relatively easy fix was to use the matplotlib style context manager to temporarily change the plotting style. For example,However, given that
plot_decision_regions
already has amarkers
andcolors
parameter for adjusting the marker style, I thought it would be natural to have amarkersize
parameter to more easily adjust the scatter plot marker size.@rasbt does adding a
markersize
parameter toplot_decision_regions
sound reasonable? If so, I can submit a PR.The text was updated successfully, but these errors were encountered: