-
Notifications
You must be signed in to change notification settings - Fork 51
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
Possibly functionalize the plotting functions? #2141
Comments
I'm in favor of this, only curious about the exact scope especially from user perspective. If it's about moving all plotting functionality in a viz module while still keeping the same user-facing methods, then I think it sounds great. It's also in line with what we discussed about "properly" eliminating |
Yeah that'd be great actually, and change the functional definitions accordingly when we do this change.
and then refactor those functions in that module to be used in:
In principle, for backwards compatibility we can make |
Yeah, what I like about this apart from backwards compatibility is that otherwise it seems to me that we have two usage options, either:
or
and both seem inferior to just |
side note: should we look into using plotly instead of matplotlib? the approach to plotting seems much more in line with the overall style of the frontend. every plotlly plot is backed by a json representation whereas it's state based in matplotlib. so we could in principle have properties or methods to attach plotly plots to our Tidy3D components, or define what these plotting components look like and assemble the total plot at the higher level |
Break this up:
viz
(fig, axs)
mechanism.object.plot
functions using theviz
module as an internal function call ontoself
.Based on a conversation I had with Marc and my own personal experience:
Maybe it'd be nicer in terms of extensibility if we had purely functional plotting? Something on the lines of:
This can make it easier to represent information as just a set of operations between fig, axs and kwargs. We can move all the plotting functionality outside the classmethods and maybe make it more reusable? This way we avoid
The text was updated successfully, but these errors were encountered: