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
This is an implementation for issue #89.
I added the save method to ShapePlotter as an abstract method and implemented it in the concrete classes.
I'm not entirely sure it should be an abstract method, would it make sense for a plotter to not have a method to save the plot in image format?
The name of the method save might be ambiguous, maybe we could use a different alternative.
Hi @ariva00 ,
Thank you for contributing!
I think we could expect to have a save method also as an abstract method.
For the name, I'm wondering if in the future we could have other methods to save images, for example, I'm expecting these functions to save images as PNG, maybe we will want a save_html in the future, we can also think of something like
Plotter.save_as_image(...) for saving image
Plotter.save_as_html(...) for saving html
Maybe we could keep save as the abstract method (with an argument type or infer the type from the extension) and have each concrete plotter implement its specific save_as_type, that depend on the backend, alongside the save method.
This way each plotter would be able to expose all the functionality of the backend and we could still have a common interface that throws an exception if the requested type is not available
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an implementation for issue #89.
I added the save method to ShapePlotter as an abstract method and implemented it in the concrete classes.
I'm not entirely sure it should be an abstract method, would it make sense for a plotter to not have a method to save the plot in image format?
The name of the method
savemight be ambiguous, maybe we could use a different alternative.