Comments (8)
info: When I run plt.show() in pycharm debug mode, other scripts, not related to this library, also fail, because the graph freezes.
Perhaps the problem is related
from distfit.
Also other plot
fig, ax = dfit.plot(chart='cdf', n_top=11)
freeze
from distfit.
Thank you for mentioning this. I can not reproduce the error.
Have you tried to create a new environment first?
Also when you install distfit, force to download the latest version. Should be 1.6.10
import distfit
distfit.__version__
conda create -n env_test python=3.10
conda activate env_test
pip install -U distfit
import numpy as np
from distfit import distfit
import matplotlib.pyplot as plt
X = np.random.normal(0, 2, 10000)
y = [-8,-6,0,1,2,3,4,5,6]
dfit = distfit(alpha=0.01)
dfit.fit_transform(X)
fig, ax = dfit.plot(chart='pdf')
fig, ax = dfit.plot(chart='cdf', n_top=11)
plt.show()
# Or
fig.show()
from distfit.
C:\Users\Massimo>pip install distfit --upgrade
Defaulting to user installation because normal site-packages is not writeable
Collecting distfit
Downloading distfit-1.6.10-py3-none-any.whl (40 kB)
---------------------------------------- 40.4/40.4 kB ? eta 0:00:00
Requirement already satisfied: scipy in c:\programdata\anaconda3\lib\site-packages (from distfit) (1.10.0)
Requirement already satisfied: pandas in c:\programdata\anaconda3\lib\site-packages (from distfit) (1.5.3)
Requirement already satisfied: tqdm in c:\programdata\anaconda3\lib\site-packages (from distfit) (4.64.1)
Requirement already satisfied: numpy in c:\users\massimo\appdata\roaming\python\python310\site-packages (from distfit) (1.25.0)
Collecting pypickle
Downloading pypickle-1.1.0-py3-none-any.whl (5.1 kB)
Collecting colourmap>=1.1.10
Downloading colourmap-1.1.14-py3-none-any.whl (9.2 kB)
Requirement already satisfied: packaging in c:\programdata\anaconda3\lib\site-packages (from distfit) (22.0)
Requirement already satisfied: statsmodels in c:\programdata\anaconda3\lib\site-packages (from distfit) (0.13.5)
Requirement already satisfied: matplotlib>=3.5.2 in c:\programdata\anaconda3\lib\site-packages (from distfit) (3.7.0)
Requirement already satisfied: pyparsing>=2.3.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (1.4.4)
Requirement already satisfied: cycler>=0.10 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (0.11.0)
Requirement already satisfied: pillow>=6.2.0 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (9.4.0)
Requirement already satisfied: fonttools>=4.22.0 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (4.25.0)
Requirement already satisfied: contourpy>=1.0.1 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (1.0.5)
Requirement already satisfied: python-dateutil>=2.7 in c:\programdata\anaconda3\lib\site-packages (from matplotlib>=3.5.2->distfit) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in c:\programdata\anaconda3\lib\site-packages (from pandas->distfit) (2022.7)
Requirement already satisfied: patsy>=0.5.2 in c:\programdata\anaconda3\lib\site-packages (from statsmodels->distfit) (0.5.3)
Requirement already satisfied: colorama in c:\programdata\anaconda3\lib\site-packages (from tqdm->distfit) (0.4.6)
Requirement already satisfied: six in c:\programdata\anaconda3\lib\site-packages (from patsy>=0.5.2->statsmodels->distfit) (1.16.0)
Installing collected packages: pypickle, colourmap, distfit
Successfully installed colourmap-1.1.14 distfit-1.6.10 pypickle-1.1.0
The update doesn't fix it. ... but with environment (argh!!) works!!!
from distfit.
I removed env_test and retried the code from cmd. Works! the problem occurs if you run the script from python console of pycharm Build #PC-231.9161.41, built on June 20, 2023
from distfit.
Happy to hear that your issue is solved!
I am not sure whether/how I can tackle this issue in the code. Maybe the most practical manner is to create a new page in the documentation that describes that some versions of pycharm can result in an error.
from distfit.
thanks for letting know
from distfit.
Related Issues (20)
- Can I use the best distribution as the true distribution of my data? HOT 3
- KS-test in fitdist HOT 13
- Add K distribution HOT 4
- Robustness of selected data models HOT 3
- pip install bnlearn? HOT 1
- Save best parameters HOT 2
- T Distribution Weirdness HOT 2
- Plots are not generated HOT 2
- A code snippet for `plotting` the best fit and the original data HOT 3
- New User Plot Question HOT 5
- new feature request - automatically fit multiple variables HOT 2
- plot_summary throws error HOT 2
- extend __init__.py descriptions HOT 3
- Help needed to interpret loc and scale HOT 2
- Boostrapping bug - The data contains non-finite values HOT 2
- Bug(?): lognorm distribution with negative loc parameter HOT 2
- Feature request: parallel execution when fitting multiple distributions HOT 3
- Quantile Bootstrap to avoid computationally expensive simple Bootstrap HOT 1
- Support Gaussian Mixture distribution fitting (2GMM, 3GMM..) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from distfit.