-
Notifications
You must be signed in to change notification settings - Fork 115
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 ruler tool in plots #291
Conversation
(to keep RADIS compatible with Python<3.7)
Codecov Report
@@ Coverage Diff @@
## develop #291 +/- ##
===========================================
- Coverage 75.24% 74.51% -0.73%
===========================================
Files 119 121 +2
Lines 14273 14627 +354
===========================================
+ Hits 10740 10900 +160
- Misses 3533 3727 +194 |
@CorentinGrimaldi could easily be added to Fitroom too (it's just an |
Hi Erwan, Also got a lot of (intended?) warnings: <matplotlib.lines.Line2D at 0x21bd051ccd0>e:\python\radis\radis\tools\plot_tools.py:199: MatplotlibDeprecationWarning: Setting the line's pick radius via set_picker is deprecated since 3.3 and will be removed two minor releases later; use set_pickradius instead.
(self._marker_a,) = self.ax.plot((x0, y0), **used_markerprops)
e:\python\radis\radis\tools\plot_tools.py:200: MatplotlibDeprecationWarning: Setting the line's pick radius via set_picker is deprecated since 3.3 and will be removed two minor releases later; use set_pickradius instead.
(self._marker_b,) = self.ax.plot((x0, y0), **used_markerprops)
e:\python\radis\radis\tools\plot_tools.py:201: MatplotlibDeprecationWarning: Setting the line's pick radius via set_picker is deprecated since 3.3 and will be removed two minor releases later; use set_pickradius instead.
(self._marker_c,) = self.ax.plot((x0, y0), **used_markerprops) |
|
Yes, that's quick funny. It works the second time. First run: e:\python\radis\radis\tools\plot_tools.py:561: UserWarning: Couldn't add Ruler tool (still an experimental feature in RADIS : please report the error !)
warn(
Second run: Treat the new Tool classes introduced in v1.5 as experimental for now, the API will likely change in version 2.1 and perhaps the rcParam as well
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\spectrum\spectrum.py:1498: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
fig = plt.figure(nfig)
e:\python\radis\radis\tools\plot_tools.py:527: UserWarning: The new Tool classes introduced in v1.5 are experimental; their API (including names) will likely change in future versions.
super().__init__(*args, **kwargs)
|
Ok so none of this looks production-ready. |
I think that's a very good idea to add a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pulled!
Alright for me :)
Description
Spectrum.plot(show_ruler=True)
andplot_diff(show_ruler=True)
Still some tiny problems with Ruler tool :