Fix Matplotlib style error caused by deprecated seaborn-white#37
Open
KAPKEPOT wants to merge 43 commits intotradytics:masterfrom
Open
Fix Matplotlib style error caused by deprecated seaborn-white#37KAPKEPOT wants to merge 43 commits intotradytics:masterfrom
KAPKEPOT wants to merge 43 commits intotradytics:masterfrom
Conversation
Updated libraries and plot styles in the BackTester class.
Updated the command for running the portfolio manager to use a configuration file instead of command-line arguments.
Added usage instructions for running the portfolio manager with a config file and a quick run option using stocks.
Updated headings in README for consistency and clarity.
Added detailed documentation for the Eiten Interactive Dashboard, including features, installation instructions, usage, and tips.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
Running the project with recent versions of Matplotlib raises the following error:
OSError: 'seaborn-white' is not a valid package style
This happens because newer versions of Matplotlib removed the legacy seaborn style aliases.
Cause
The code currently uses:
plt.style.use('seaborn-white')
However, this style name is no longer included in the Matplotlib style library.
Solution
Replace the deprecated style with the updated style name:
plt.style.use('seaborn-v0_8-white')
This restores compatibility with modern Matplotlib versions.
Impact
Fixes runtime error when executing the simulator.
Maintains the same visual style for plots.
Ensures compatibility with recent Matplotlib releases.
Files modified
simulator.py
eiten.py
backtester.py