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
{{ message }}
Repository navigation
Commit 9984b49
Browse filesBrowse the repository at this point in the historyBrowse files
Fix custom colormaps location (store them in the application config dir) (#88)
* fix(colormap): store custom colormaps in the application config dir
PlotPy's configuration had no application name, so custom colormaps
were saved in a "~/.none" directory shared by all applications, which
was created as soon as colormaps were loaded. Their path was moreover
computed at import time, so that an application naming PlotPy's
configuration afterwards (e.g. "DataLab_v1/plotpy") never got its own
custom colormaps.
- Name PlotPy's configuration "plotpy" by default
- Compute the custom colormaps path on demand, and reload custom
colormaps in place each time CONF.set_application is called
(CUSTOM_COLORMAPS_PATH remains available, computed on demand)
- The first time, copy custom colormaps from the legacy ".none" and
".plotpy" directories, without modifying the legacy files
- Do not create the configuration directory on path lookups
- Run colormap tests in a temporary configuration directory
Closes#70
Assisted-by: Claude Opus 5.5
* docs: add release notes for the custom colormaps location fix
Assisted-by: Claude Opus 5.5
Copy file name to clipboardExpand all lines: doc/release_notes/release_2.12.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
***Editing points of downsampled curves** — With downsampling enabled, moving a curve point modified another point of the curve data than the one shown, since the handle of a drawn point was used as an index into the full data
13
13
***Curve fitting dialog** — Running the automatic fit no longer raises `OverflowError: argument 1 overflowed` errors when a fitted value ends up far outside the range of its slider (e.g. with the Powell method on a fit range restricted to the tail of a peak). These errors left the slider of the parameter unresponsive, and the values of the following parameters were not displayed. Such values are now shown with a warning icon, whose tooltip gives the slider range, while the slider stays at its nearest end. Typing `nan` or `inf` in a parameter field now restores the previous value instead of raising errors, and the number of slider steps must be at least 2 in the parameter properties dialog (closes [Issue #76](https://github.com/PlotPyStack/PlotPy/issues/76))
14
14
***Cross-section panels with many hidden images** — X/Y cross-section panels kept one curve for every image ever displayed, even after it was hidden, so plots containing hundreds of hidden images became progressively slower to refresh. Curves are now only kept for visible images, and are recreated when a hidden image is shown again
15
+
***Custom colormaps location** — Custom colormaps were saved in a `.none` directory of the user's configuration directory (`~/.config/.none` on Linux, `%USERPROFILE%\.none` on Windows), shared by all applications whatever their own configuration directory, and this directory was created as soon as colormaps were loaded. Custom colormaps are now saved in PlotPy's configuration directory (`.plotpy` by default) or, if the application sets the name of PlotPy's configuration with `plotpy.config.CONF.set_application` (e.g. `"MyApp/plotpy"`), in the configuration directory of this application, from which they are reloaded even if the name is set after PlotPy was imported. The first time, custom colormaps saved in the former `.none` and `.plotpy` directories are copied to the new location, without modifying the former files. Looking up the location of PlotPy's configuration files no longer creates any directory (closes [Issue #70](https://github.com/PlotPyStack/PlotPy/issues/70))
0 commit comments