Giter Site home page Giter Site logo

plot freeze about distfit HOT 8 OPEN

erdogant avatar erdogant commented on May 26, 2024
plot freeze

from distfit.

Comments (8)

alekin2 avatar alekin2 commented on May 26, 2024 1

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.

alekin2 avatar alekin2 commented on May 26, 2024

Also other plot

fig, ax = dfit.plot(chart='cdf', n_top=11)

freeze

from distfit.

erdogant avatar erdogant commented on May 26, 2024

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.

alekin2 avatar alekin2 commented on May 26, 2024

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.

alekin2 avatar alekin2 commented on May 26, 2024

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.

erdogant avatar erdogant commented on May 26, 2024

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.

erdogant avatar erdogant commented on May 26, 2024

thanks for letting know

from distfit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.