ansys / pyfluent

Pythonic interface to Ansys Fluent
https://fluent.docs.pyansys.com
MIT License
263 stars 41 forks source link

Saving picture with auto_scale has different zoom level on linux from windows #2320

Closed answillgm closed 7 months ago

answillgm commented 9 months ago

šŸ” Before submitting the issue

šŸž Description of the bug

Creating a contour plot and saving as an image appears to have a different zoom level on linux vs windows. The image dimensions are the same however. This happens with graphics.views.auto_scale() called. This is causing a regression test to fail.

vel-contour can (Windows)

vel-contour (Linux)

vel-contour_diff (visualized difference)

šŸ“ Steps to reproduce

  1. Download and unzip the attached files
  2. From the unzipped directory, run the python file - this should among other things output a "vel-contour.png" file

This image should be of a different zoom level to the "vel-contour-original.png" file on linux, but should match on windows

recreate.zip

šŸ’» Which operating system are you using?

Linux

šŸ“€ Which ANSYS version are you using?

24.2

šŸ Which Python version are you using?

3.10

šŸ“¦ Installed packages

absl-py==2.0.0
ansi2html==1.9.1
ansys-api-fluent==0.3.19
ansys-api-platform-instancemanagement==1.0.0
# Editable install with no version control (ansys-fluent-core==0.19.dev1)
-e /home/staff/miltestadmin/pyfluent
# Editable install with no version control (ansys-fluent-parametric==0.9.dev0)
-e /home/staff/miltestadmin/pyfluent-parametric
# Editable install with no version control (ansys-fluent-visualization==0.8.dev1)
-e /home/staff/miltestadmin/pyfluent-visualization
ansys-platform-instancemanagement==1.1.2
asttokens==2.4.1
astunparse==1.6.3
bcrypt==4.1.2
beartype==0.16.4
blinker==1.7.0
cachetools==5.3.2
certifi==2023.11.17
cffi==1.16.0
charset-normalizer==3.3.2
click==8.1.7
contourpy==1.2.0
cryptography==41.0.7
cycler==0.12.1
dash==2.14.2
dash-bootstrap-components==1.5.0
dash-core-components==2.0.0
dash-html-components==2.0.0
dash-table==5.0.0
decorator==5.1.1
docker==7.0.0
et-xmlfile==1.1.0
exceptiongroup==1.2.0
executing==2.0.1
Flask==3.0.0
flatbuffers==23.5.26
fonttools==4.46.0
gast==0.5.4
google-auth==2.25.2
google-auth-oauthlib==1.2.0
google-pasta==0.2.0
grpcio==1.60.0
grpcio-health-checking==1.48.2
h5py==3.10.0
idna==3.6
imageio==2.33.1
importlib-metadata==7.0.0
ipython==8.18.1
itsdangerous==2.1.2
jedi==0.19.1
Jinja2==3.1.2
joblib==1.3.2
kaleido==0.2.1
keras==2.15.0
kiwisolver==1.4.5
libclang==16.0.6
lxml==4.9.3
Markdown==3.5.1
MarkupSafe==2.1.3
matplotlib==3.8.2
matplotlib-inline==0.1.6
ml-dtypes==0.2.0
nest-asyncio==1.5.8
numpy==1.26.2
oauthlib==3.2.2
openpyxl==3.1.2
opt-einsum==3.3.0
packaging==23.2
pandas==2.1.4
paramiko==3.3.1
paramiko-expect==0.3.5
parso==0.8.3
pexpect==4.9.0
Pillow==10.1.0
platformdirs==4.1.0
plotly==5.18.0
pooch==1.8.0
prompt-toolkit==3.0.43
protobuf==3.20.3
psutil==5.9.7
ptyprocess==0.7.0
pure-eval==0.2.2
pyasn1==0.5.1
pyasn1-modules==0.3.0
pycparser==2.21
Pygments==2.17.2
PyNaCl==1.5.0
pyparsing==3.1.1
PySide6==6.6.1
PySide6-Addons==6.6.1
PySide6-Essentials==6.6.1
python-dateutil==2.8.2
python-pptx==0.6.23
pytz==2023.3.post1
pyvista==0.43.1
pyvistaqt==0.11.0
PyYAML==6.0.1
QtPy==2.4.1
requests==2.31.0
requests-oauthlib==1.3.1
retrying==1.3.4
rsa==4.9
scikit-learn==1.3.2
scipy==1.11.4
scooby==0.9.2
seaborn==0.13.0
shiboken6==6.6.1
six==1.16.0
stack-data==0.6.3
tenacity==8.2.3
tensorboard==2.15.1
tensorboard-data-server==0.7.2
tensorflow==2.15.0.post1
tensorflow-estimator==2.15.0
tensorflow-io-gcs-filesystem==0.34.0
termcolor==2.4.0
threadpoolctl==3.2.0
traitlets==5.14.0
typing_extensions==4.9.0
tzdata==2023.3
urllib3==2.1.0
vtk==9.3.20230807rc0
wcwidth==0.2.12
Werkzeug==3.0.1
wrapt==1.14.1
xgboost==2.0.2
XlsxWriter==3.1.9
zipp==3.17.0
cj-hodgson commented 7 months ago

@answillgm Can this be reproduced in the Fluent Python console?

seanpearsonuk commented 7 months ago

@answillgm

  1. which is the corect result in your opinion? You have marked it bug so you must have an opinion about that.
  2. can you reproduce the difference just using TUI in Fluent?
answillgm commented 7 months ago

@cj-hodgson This happens in the fluent python console as well as far as I can tell

answillgm commented 7 months ago

@seanpearsonuk

  1. The correct result to me would be the same pyfluent setup and commands producing the same output between the two platforms
  2. This also seems to happen with the tui, which provides a different output to both previous windows and linux outputs - will close as does not appear to be an issue with pyfluent if is an issue