Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converted image all black #20

Open
MattiasSealander opened this issue Oct 14, 2021 · 4 comments
Open

Converted image all black #20

MattiasSealander opened this issue Oct 14, 2021 · 4 comments

Comments

@MattiasSealander
Copy link

Screenshot

Converted image turns fully black
bild

Actual diagram for comparison

bild

Problem description

After selecting the data the converted image turns all black as in screenshot above.

Expected Output

The converted image should be a binary (black/white) image of the actual diagram but instead fills the selected data area with black. I have attempted to reinstall straditize as well as update dependencies with no change. On a previous installation on my laptop straditize worked fine (spring/summer 2020), but upon installing recently on another computer this issue appears. Fresh install on my laptop created the same issue, this was needed as straditize would not launch on the laptop.

Environment information

psyplot -aV

psy_simple.plugin:
version: 1.4.0
psy_strat.plugin:
version: 0.1.0
psyplot:
requirements:
matplotlib: 3.4.3
numpy: 1.21.2
pandas: 1.3.3
python: 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:22:46) [MSC
v.1916 64 bit (AMD64)]
xarray: 0.19.0
version: 1.4.0
psyplot_gui:
requirements:
pyqt: 5.12.3
qt: 5.12.9
qtconsole: 5.1.1
version: 1.4.0

straditize -V

0.1.3

conda info -a
     active environment : straditize
    active env location : C:\Users\*****\Anaconda3\envs\straditize
            shell level : 2
       user config file : C:\Users\*****\.condarc
 populated config files :
          conda version : 4.10.3
    conda-build version : 3.21.4
         python version : 3.8.8.final.0
       virtual packages : __win=0=0
                          __archspec=1=x86_64
       base environment : C:\Users\*****\Anaconda3  (writable)
      conda av data dir : C:\Users\*****\Anaconda3\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\Users\*****\Anaconda3\pkgs
                          C:\Users\*****\.conda\pkgs
                          C:\Users\*****\AppData\Local\conda\conda\pkgs
       envs directories : C:\Users\*****\Anaconda3\envs
                          C:\Users\*****\.conda\envs
                          C:\Users\*****\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.10.3 requests/2.25.1 CPython/3.8.8 Windows/10 Windows/10.0.19041
          administrator : False
             netrc file : None
           offline mode : False

# conda environments:
#
base                     C:\Users\*****\Anaconda3
straditize            *  C:\Users\*****\Anaconda3\envs\straditize

sys.version: 3.8.8 (default, Apr 13 2021, 15:08:03) [...
sys.prefix: C:\Users\*****\Anaconda3
sys.executable: C:\Users\*****\Anaconda3\python.exe
conda location: C:\Users\*****\Anaconda3\lib\site-packages\conda
conda-build: C:\Users\*****\Anaconda3\Scripts\conda-build.exe
conda-content-trust: C:\Users\*****\Anaconda3\Scripts\conda-content-trust.exe
conda-convert: C:\Users\*****\Anaconda3\Scripts\conda-convert.exe
conda-debug: C:\Users\*****\Anaconda3\Scripts\conda-debug.exe
conda-develop: C:\Users\*****\Anaconda3\Scripts\conda-develop.exe
conda-env: C:\Users\*****\Anaconda3\Scripts\conda-env.exe
conda-index: C:\Users\*****\Anaconda3\Scripts\conda-index.exe
conda-inspect: C:\Users\*****\Anaconda3\Scripts\conda-inspect.exe
conda-metapackage: C:\Users\*****\Anaconda3\Scripts\conda-metapackage.exe
conda-render: C:\Users\*****\Anaconda3\Scripts\conda-render.exe
conda-repo: C:\Users\*****\Anaconda3\Scripts\conda-repo.exe
conda-server: C:\Users\*****\Anaconda3\Scripts\conda-server.exe
conda-skeleton: C:\Users\*****\Anaconda3\Scripts\conda-skeleton.exe
conda-token: C:\Users\*****\Anaconda3\Scripts\conda-token.exe
conda-verify: C:\Users\*****\Anaconda3\Scripts\conda-verify.exe
user site dirs:

CIO_TEST: <not set>
CONDA_DEFAULT_ENV: straditize
CONDA_EXE: C:\Users\*****\Anaconda3\condabin\..\Scripts\conda.exe
CONDA_EXES: "C:\Users\*****\Anaconda3\condabin\..\Scripts\conda.exe"
CONDA_PREFIX: C:\Users\*****\Anaconda3\envs\straditize
CONDA_PREFIX_1: C:\Users\*****\Anaconda3
CONDA_PROMPT_MODIFIER: (straditize)
CONDA_PYTHON_EXE: C:\Users\*****\Anaconda3\python.exe
CONDA_ROOT: C:\Users\*****\Anaconda3
CONDA_SHLVL: 2
CURL_CA_BUNDLE: <not set>
HOMEPATH: \Users\*****
PATH: C:\Users\*****\Anaconda3;C:\Users\*****\Anaconda3\Library\mingw-w64\bin;C:\Users\*****\Anaconda3\Library\usr\bin;C:\Users\*****\Anaconda3\Library\bin;C:\Users\*****\Anaconda3\Scripts;C:\Users\*****\Anaconda3\bin;C:\Users\*****\Anaconda3\envs\straditize;C:\Users\*****\Anaconda3\envs\straditize\Library\mingw-w64\bin;C:\Users\*****\Anaconda3\envs\straditize\Library\usr\bin;C:\Users\*****\Anaconda3\envs\straditize\Library\bin;C:\Users\*****\Anaconda3\envs\straditize\Scripts;C:\Users\*****\Anaconda3\envs\straditize\bin;C:\Users\*****\Anaconda3\condabin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files\CrashPlan\jre\bin\server;C:\Program Files\CrashPlan\jre\bin;C:\Program Files\MATLAB\R2021b\runtime\win64;C:\Program Files\MATLAB\R2021b\bin;C:\Program Files\MATLAB\MATLAB Runtime\v911\runtime\win64;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\runtime\win64;C:\Users\*****\AppData\Local\Microsoft\WindowsApps;C:\Users\*****\AppData\Local\Programs\Git\cmd
PSMODULEPATH: C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE: <not set>
SSL_CERT_FILE: <not set>
conda list
# packages in environment at C:\Users\****\Anaconda3\envs\straditize:
#
# Name                    Version                   Build  Channel
alabaster                 0.7.12                     py_0    conda-forge
appdirs                   1.4.4              pyh9f0ad1d_0    conda-forge
babel                     2.9.1              pyh44b312d_0    conda-forge
backcall                  0.2.0              pyh9f0ad1d_0    conda-forge
backports                 1.0                        py_2    conda-forge
backports.functools_lru_cache 1.6.4              pyhd8ed1ab_0    conda-forge
blosc                     1.21.0               h0e60522_0    conda-forge
brotlipy                  0.7.0           py38h294d835_1001    conda-forge
bzip2                     1.0.8                h8ffe710_4    conda-forge
c-blosc2                  2.0.4                h09319c2_1    conda-forge
ca-certificates           2021.9.30            haa95532_1
certifi                   2021.10.8        py38haa95532_0
cffi                      1.14.6           py38hd8c33c5_1    conda-forge
cfitsio                   3.470                h0af3d06_7    conda-forge
cftime                    1.5.1            py38h6f4d8f0_0    conda-forge
chardet                   4.0.0            py38haa244fe_1    conda-forge
charls                    2.2.0                h39d44d4_0    conda-forge
charset-normalizer        2.0.0              pyhd8ed1ab_0    conda-forge
cloudpickle               2.0.0              pyhd8ed1ab_0    conda-forge
colorama                  0.4.4              pyh9f0ad1d_0    conda-forge
cryptography              3.4.8            py38hd7da0ea_0    conda-forge
curl                      7.79.1               h789b8ee_1    conda-forge
cycler                    0.10.0                     py_2    conda-forge
cytoolz                   0.11.0           py38h294d835_3    conda-forge
dask-core                 2021.9.1           pyhd8ed1ab_0    conda-forge
debugpy                   1.4.1            py38h885f38d_0    conda-forge
decorator                 4.4.2                      py_0    conda-forge
docrep                    0.3.2              pyh44b312d_0    conda-forge
docutils                  0.17.1           py38haa244fe_0    conda-forge
entrypoints               0.3             pyhd8ed1ab_1003    conda-forge
et_xmlfile                1.0.1                   py_1001    conda-forge
fasteners                 0.16               pyhd8ed1ab_0    conda-forge
freetype                  2.10.4               h546665d_1    conda-forge
fsspec                    2021.10.0          pyhd8ed1ab_0    conda-forge
funcargparse              0.2.5              pyhd8ed1ab_0    conda-forge
giflib                    5.2.1                h8d14728_2    conda-forge
hdf4                      4.2.15               h0e5069d_3    conda-forge
hdf5                      1.12.1          nompi_h2a0e4a3_101    conda-forge
icu                       68.1                 h0e60522_0    conda-forge
idna                      3.1                pyhd3deb0d_0    conda-forge
imagecodecs               2021.8.26        py38hc88f965_1    conda-forge
imageio                   2.9.0                      py_0    conda-forge
imagesize                 1.2.0                      py_0    conda-forge
intel-openmp              2021.4.0          h57928b3_3556    conda-forge
ipykernel                 6.4.1            py38h595d716_0    conda-forge
ipython                   7.28.0           py38h595d716_0    conda-forge
ipython_genutils          0.2.0                      py_1    conda-forge
jbig                      2.1               h8d14728_2003    conda-forge
jedi                      0.18.0           py38haa244fe_2    conda-forge
jinja2                    3.0.2              pyhd8ed1ab_0    conda-forge
jpeg                      9d                   h8ffe710_0    conda-forge
jupyter_client            7.0.6              pyhd8ed1ab_0    conda-forge
jupyter_core              4.8.1            py38haa244fe_0    conda-forge
jxrlib                    1.1                  h8ffe710_2    conda-forge
kiwisolver                1.3.2            py38hbd9d945_0    conda-forge
krb5                      1.19.2               hbae68bd_2    conda-forge
lcms2                     2.12                 h2a16943_0    conda-forge
lerc                      3.0                  h0e60522_0    conda-forge
libaec                    1.0.6                h39d44d4_0    conda-forge
libblas                   3.9.0              11_win64_mkl    conda-forge
libbrotlicommon           1.0.9                h8ffe710_5    conda-forge
libbrotlidec              1.0.9                h8ffe710_5    conda-forge
libbrotlienc              1.0.9                h8ffe710_5    conda-forge
libcblas                  3.9.0              11_win64_mkl    conda-forge
libclang                  11.1.0          default_h5c34c98_1    conda-forge
libcurl                   7.79.1               h789b8ee_1    conda-forge
libdeflate                1.8                  h8ffe710_0    conda-forge
liblapack                 3.9.0              11_win64_mkl    conda-forge
libnetcdf                 4.8.1           nompi_h1cc8e9d_101    conda-forge
libpng                    1.6.37               h1d00b33_2    conda-forge
libsodium                 1.0.18               h8d14728_1    conda-forge
libssh2                   1.10.0               h680486a_2    conda-forge
libtiff                   4.3.0                hd413186_2    conda-forge
libwebp-base              1.2.1                h8ffe710_0    conda-forge
libzip                    1.8.0                hfed4ece_1    conda-forge
libzlib                   1.2.11            h8ffe710_1013    conda-forge
libzopfli                 1.0.3                h0e60522_0    conda-forge
locket                    0.2.0                      py_2    conda-forge
lz4-c                     1.9.3                h8ffe710_1    conda-forge
m2w64-gcc-libgfortran     5.3.0                         6    conda-forge
m2w64-gcc-libs            5.3.0                         7    conda-forge
m2w64-gcc-libs-core       5.3.0                         7    conda-forge
m2w64-gmp                 6.1.0                         2    conda-forge
m2w64-libwinpthread-git   5.0.0.4634.697f757               2    conda-forge
markupsafe                2.0.1            py38h294d835_0    conda-forge
matplotlib-base           3.4.3            py38h1f000d6_1    conda-forge
matplotlib-inline         0.1.3              pyhd8ed1ab_0    conda-forge
mkl                       2021.3.0           hb70f87d_564    conda-forge
monotonic                 1.5                        py_0    conda-forge
msys2-conda-epoch         20160418                      1    conda-forge
nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
netcdf4                   1.5.7           nompi_py38h0500770_103    conda-forge
networkx                  2.6.3              pyhd8ed1ab_0    conda-forge
numpy                     1.21.2           py38h089cfbf_0    conda-forge
olefile                   0.46               pyh9f0ad1d_1    conda-forge
openjpeg                  2.4.0                hb211442_1    conda-forge
openpyxl                  3.0.9              pyhd8ed1ab_0    conda-forge
openssl                   1.1.1l               h2bbff1b_0
packaging                 21.0               pyhd8ed1ab_0    conda-forge
pandas                    1.3.3            py38h5d928e2_0    conda-forge
parso                     0.8.2              pyhd8ed1ab_0    conda-forge
partd                     1.2.0              pyhd8ed1ab_0    conda-forge
pickleshare               0.7.5                   py_1003    conda-forge
pillow                    8.3.2            py38h794f750_0    conda-forge
pip                       21.3               pyhd8ed1ab_0    conda-forge
pooch                     1.5.2              pyhd8ed1ab_0    conda-forge
prompt-toolkit            3.0.20             pyha770c72_0    conda-forge
psy-simple                1.4.0            py38haa244fe_0    conda-forge
psy-strat                 0.1.1                    py38_0    conda-forge
psyplot                   1.4.0            py38haa244fe_0    conda-forge
psyplot-gui               1.4.0            py38haa244fe_0    conda-forge
pycparser                 2.20               pyh9f0ad1d_2    conda-forge
pygments                  2.10.0             pyhd8ed1ab_0    conda-forge
pyopenssl                 21.0.0             pyhd8ed1ab_0    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pyqt                      5.12.3           py38haa244fe_7    conda-forge
pyqt-impl                 5.12.3           py38h885f38d_7    conda-forge
pyqt5-sip                 4.19.18          py38h885f38d_7    conda-forge
pyqt6                     6.2.0                    pypi_0    pypi
pyqt6-qt6                 6.2.0                    pypi_0    pypi
pyqt6-sip                 13.1.0                   pypi_0    pypi
pyqtchart                 5.12             py38h885f38d_7    conda-forge
pyqtwebengine             5.12.1           py38h885f38d_7    conda-forge
pysocks                   1.7.1            py38haa244fe_3    conda-forge
python                    3.8.12          h7840368_2_cpython    conda-forge
python-dateutil           2.8.2              pyhd8ed1ab_0    conda-forge
python_abi                3.8                      2_cp38    conda-forge
pytz                      2021.3             pyhd8ed1ab_0    conda-forge
pywavelets                1.1.1            py38h6f4d8f0_3    conda-forge
pywin32                   301              py38h294d835_0    conda-forge
pyyaml                    5.4.1            py38h294d835_1    conda-forge
pyzmq                     22.3.0           py38h09162b1_0    conda-forge
qt                        5.12.9               h5909a2a_4    conda-forge
qtconsole                 5.1.1              pyhd8ed1ab_0    conda-forge
qtpy                      1.11.2             pyhd8ed1ab_0    conda-forge
requests                  2.26.0             pyhd8ed1ab_0    conda-forge
scikit-image              0.18.1           py38hf11a4ad_0
scipy                     1.7.1            py38ha1292f7_0    conda-forge
setuptools                58.2.0           py38haa244fe_0    conda-forge
six                       1.16.0             pyh6c4a22f_0    conda-forge
snappy                    1.1.8                ha925a31_3    conda-forge
snowballstemmer           2.1.0              pyhd8ed1ab_0    conda-forge
sphinx                    4.2.0              pyh6c4a22f_0    conda-forge
sphinx_rtd_theme          1.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-applehelp   1.0.2                      py_0    conda-forge
sphinxcontrib-devhelp     1.0.2                      py_0    conda-forge
sphinxcontrib-htmlhelp    2.0.0              pyhd8ed1ab_0    conda-forge
sphinxcontrib-jsmath      1.0.1                      py_0    conda-forge
sphinxcontrib-qthelp      1.0.3                      py_0    conda-forge
sphinxcontrib-serializinghtml 1.1.5              pyhd8ed1ab_0    conda-forge
sqlite                    3.36.0               h8ffe710_2    conda-forge
straditize                0.1.3                    py38_0    conda-forge
tbb                       2021.3.0             h2d74725_0    conda-forge
tifffile                  2021.10.12         pyhd8ed1ab_0    conda-forge
tk                        8.6.11               h8ffe710_1    conda-forge
toolz                     0.11.1                     py_0    conda-forge
tornado                   6.1              py38h294d835_1    conda-forge
traitlets                 5.1.0              pyhd8ed1ab_0    conda-forge
ucrt                      10.0.20348.0         h57928b3_0    conda-forge
urllib3                   1.26.7             pyhd8ed1ab_0    conda-forge
vc                        14.2                 hb210afc_5    conda-forge
vs2015_runtime            14.29.30037          h902a5da_5    conda-forge
wcwidth                   0.2.5              pyh9f0ad1d_2    conda-forge
wheel                     0.37.0             pyhd8ed1ab_1    conda-forge
win_inet_pton             1.1.0            py38haa244fe_2    conda-forge
xarray                    0.19.0             pyhd8ed1ab_1    conda-forge
xz                        5.2.5                h62dcd97_1    conda-forge
yaml                      0.2.5                he774522_0    conda-forge
zeromq                    4.3.4                h0e60522_1    conda-forge
zfp                       0.5.5                h0e60522_7    conda-forge
zlib                      1.2.11            h8ffe710_1013    conda-forge
zstd                      1.5.0                h6255e5f_0    conda-forge

NOTE

This is a bug report.

For requesting new features, use this template.

For changing existing features, use this template.

@gcaha
Copy link

gcaha commented May 7, 2022

Same issue here. Convert Image button turns the graph black. Tried installing your fix using pip command from a different post and still have the problem. Also tried using different data part types like area or stacked and it didn't change. Would be great to see a fix!

@MattiasSealander
Copy link
Author

@gcaha I used the pip command fixes from issue #21 and managed to get it to work, i.e. the converted image isn't all black. It initially did not work, but I think an important step is to uninstall previous matplotlib, as zhouborui97 commented, and install version 3.4.3. I still had issues with the automatic detection of sample points last time I used it, but uncertain whether that is due to image quality or something else. I made sure that I could still convert the image with the fix before commenting this though.

@gcaha
Copy link

gcaha commented May 9, 2022 via email

@MattiasSealander
Copy link
Author

That is too bad! It was some time back now, but I seem to remember that I did a fresh install, used the fix Chilipp added in the response to issue #22 and rolled back the matplotlib. I am unsure whether I used the first fix:

conda activate straditize
pip install git+https://github.com/Chilipp/straditize.git@fix/black-image

Or second approach:
conda activate straditize
git clone https://github.com/Chilipp/straditize
cd straditize
git checkout fix/black-image
pip install .

I at least know that I didn't need to comment out that one line in setup.py.
Sorry I can't be of any more help, as I am simply not experience enough with python. As you aren't getting any errors then my very uninformed guess is that it comes down to updates and libraries.
Hope you manage to solve it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants