Content-Length: 283037 | pFad | http://github.com/mcuntz/ncvue/commit/6ce667c156f476bd8c5acb9a4dcbf81f94ae828a

7E Increased number of digits in format_coord_scatter · mcuntz/ncvue@6ce667c · GitHub
Skip to content

Commit

Permalink
Increased number of digits in format_coord_scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuntz committed Jan 20, 2025
1 parent 6419384 commit 6ce667c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Changelog
---------

v5.2 (??? 2025)
* Increased number of digits in format_coord_scatter.

v5.1 (Dec 2024)
* Use ncvue-specific theme with customtkinter.
* Update images for new matplotlib cmaps.
* Bugfix: file not updated in all tabs when opened with file dialog
in one tab with CustomTkinter.
Expand Down
1 change: 1 addition & 0 deletions src/ncvue/ncvue.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
* Change formatting of file string for multiple files,
Jul 2024, Matthias Cuntz
* Use CustomTkinter if installed, Nov 2024, Matthias Cuntz
* Use own ncvue-blue theme for customtkinter, Dec 2024, Matthias Cuntz
"""
import os
Expand Down
7 changes: 4 additions & 3 deletions src/ncvue/ncvutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* Remove [ms] from check for datetime in format_coord on axes,
Oct 2024, Matthias Cuntz
* Use CustomTkinter in clone_ncvmain if installed, Nov 2024, Matthias Cuntz
* Increased digits in format_coord_scatter, Jan 2025, Matthias Cuntz
"""
import tkinter as tk
Expand Down Expand Up @@ -627,15 +628,15 @@ def format_coord_scatter(x, y, ax, ax2, xdtype, ydtype, y2dtype):
if xdtype.type == np.dtype('datetime64').type:
xstr = mpld.num2date(x).strftime('%Y-%m-%d %H:%M:%S')
else:
xstr = '{:.3g}'.format(x)
xstr = '{:.6g}'.format(x)
if ydtype.type == np.dtype('datetime64').type:
ystr = mpld.num2date(ax_coord[1]).strftime('%Y-%m-%d %H:%M:%S')
else:
ystr = '{:.3g}'.format(ax_coord[1])
ystr = '{:.6g}'.format(ax_coord[1])
if y2dtype.type == np.dtype('datetime64').type:
y2str = mpld.num2date(y).strftime('%Y-%m-%d %H:%M:%S')
else:
y2str = '{:.3g}'.format(y)
y2str = '{:.6g}'.format(y)
out = f'Left: ({xstr}, {ystr}) Right: ({xstr}, {y2str})'
return out

Expand Down

0 comments on commit 6ce667c

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/mcuntz/ncvue/commit/6ce667c156f476bd8c5acb9a4dcbf81f94ae828a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy