When viewing the monitor results of a simulation in the GUI, data shows up with an offset and the axes are a bit distorted. For example, I actually found out that there is a difference between my results and the screenshots in 3.11. Hydrogen oxidation in a batch reactor using CHEMKIN mechanism — MFiX 25.2 documentation, e.g. in my case H2 and O2 concentrations went negative while in the tutorial screenshots they didn’t. I have noticed that this issue of wrong axis alignment also happens in other tutorials so it is not tutorial specific.
I ran the hydrogen oxidation tutorial (ready to run) with MFiX 25.2.1 on both Linux and Windows and am not able to reproduce this bad axis alignment.
One thing I notice about the monitors window is that it’s perfectly happy to plot variables that don’t really belong on the same Y-axis, like temperatures and mass fractions:
and the Y-axis lacks a label for units, since quantities with different units are being plotted on the same axes… I’m not sure if there’s an easy fix for this. You can create multiple monitors panes to display different quantities on their own axes. It might be nice if we had multiple plots in the same pane, but we’re not likely to add this feature soon.
When I brought up the tutorial, all the monitors were enabled, I had to turn off everything but x_g_H2 and x_g_02 to get this result. Once I disabled the temperature, the axis rescaled to a reasonable range for mass fractions…
I’d like to fix the problem you are seeing but can’t reproduce it. Can you tell me the exact steps you took to get to this point? Did you rescale the axes at all? Did you click the “autoscale” icon (A) in the bottom corner of the plot window (only appears if the view has been panned or scaled). And can you attach a bug report ZIP file so I can see all the versions of libraries you are using?
– Charles
Thanks for your suggestion. It’s hard for me to explain how to reproduce this issue, since I follow the steps from the tutorial EXACTLY. On my system indeed all monitors were visible by default which causes some of the variables to be badly represented: the mass fractions are much smaller numbers than the temperature so in order to view them I indeed had to rescale. Already before rescaling the axis show the same distortions. Also, if I just show one variable and uncheck all the others, the axes are still rendered wrong, e.g. the gap on the y-axis below y=0 as shown on my screenshot is still there and the graphs have some kind of offset.
This effect basically happens in every monitor I create in every simulation so it is not specific for this tutorial. It doesn’t matter if I use auto-scale, manual scaling, or if I show multiple monitors or only one in a single graph. It’s not a super big deal to me, because I know the correct data is written to the .csv files and I can use that make the plots myself. When I plot the results from the .csv files they match with the results shown in your screenshots. To me that clearly means it’s an issue in the rendering and not an issue with the results themselves.
I have attached the .zip file for bug reporting.
tutorial_11_hydrogen_oxidation_2025-09-15T155502.818675.zip (10.1 MB)
I would really like to fix this bug but it’s difficult if I can’t reproduce it. Is there anything unusual about your monitor setup or screen resolution?
Unfortunately something is wrong with the bug reporting script (I’ll look into this!) and the “conda” command was not found, so the file conda_list.txt
(which is supposed to list your package versions) is empty. Can you please open a miniforge prompt, activate the mfix conda environment, run conda list
and show me the output?
I also noticed that in the “About MFiX” pane the field that should be indicating the conda version shows Conda: Unavailable. I already noticed this in the beginning. I have installed Miniforge and MFiX according to the manual. I’m not sure if this is an important issue.
I also noticed that when I just started MFiX today, suddenly all issues with the axis had disappeared. Since you mentioned something about screen resolution and monitor setup I started thinking: I did start-up MFiX on my laptop today without using my second screen. So what I did next was connect my second screen. Then I moved my MFiX GUI to the second screen and suddenly the issue appeared again.
Normally I would work in the GUI on my second (bigger) screen and the issue would be there all the time. I actually never tried the GUI on my laptop screen but apparently when I do so, the issue is gone. So it definitely has something to do with using an external monitor. I have tried two different external monitors and both show the same issue.
Here is my conda environment exported to a .yml file:
myenvironment.yml (7.8 KB)
Thank you, that is helpful.
I am surprised to see both qt5 and qt6 in this list. The app should be using qt5.
- qt-main=5.15.15=h9151539_4
- qt6-main=6.8.3=h02ddd7d_4
The mix of Qt libraries might be the problem… It’s also possible that you have a high DPI display. Can you tell me what your system reports for screen resolution? (Both with and without the external monitor?)
Newsflash: I am able to reproduce this problem with a Windows laptop plugged in to an external monitor. Since I can now reproduce the problem, there’s a good chance I can fix this for the upcoming 25.3 release.
Thanks for your patience and helpful input.
– Charles
Here’s something you can try:
open the file
%CONDA_PREFIX%\Lib\site-packages\mfixgui\main.py
in a text editor.
Change the commented-out lines (around line 88) to the following (uncommented):
QtCore.QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
QtCore.QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
This cleared up the issue for me. (It also makes the GUI larger on the external monitor but I think that’s an improvement. You can reduce the font size in “Settings” if it’s too big for you)
Please let me know if this clears up the problem. I will probably add this to the next release, or make it an option users can select in Settings.
The display resolution in my system preferences is set to 1920 x 1080. Before implementing any of your proposed adjustments in my main.py file, it looked like:
# Disable Qt scaling, it looks bad on most displays
#QtCore.QCoreApplication.setAttribute(Qt.AA_Use96Dpi, False)
#QtCore.QCoreApplication.setAttribute(Qt.AA_DisableHighDpiScaling, False)
#QtCore.QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
Note that the second line from your suggestion was initially not included in my main.py file. After removing the comment from the last line and adding the UseHighDpiPixmaps-comment, My main.py now looks like:
# Disable Qt scaling, it looks bad on most displays
#QtCore.QCoreApplication.setAttribute(Qt.AA_Use96Dpi, False)
#QtCore.QCoreApplication.setAttribute(Qt.AA_DisableHighDpiScaling, False)
QtCore.QCoreApplication.setAttribute(Qt.AA_EnableHighDpiScaling, True)
QtCore.QCoreApplication.setAttribute(Qt.AA_UseHighDpiPixmaps, True)
Unfortunately, this didn’t resolve the issue. Do I have to recompile the program somehow or should it be working right after updating the main.py file?
I was able to duplicate the problem on my dual-monitor setup on Windows and for me enabling the high-DPI scaling fixed the issue. We are releasing 25.3 this week which will have high-DPI scaling enabled by default (it can be turned off in Preferences). Maybe this will fix the problem for you. Otherwise I am running out of ideas.
I’m also not sure why qt5 and qt6 both got installed automatically. I just followed the regular installation instructions, so I suppose any of the other packages that got installed during the process depends on qt6. I could of course try removing qt6 and check if everything still works after that.
I also have qt5 and qt6 and no issues. I’m not sure what’s going on here but that doesn’t seem to be the source of the problem. For the next release (25.4) I plan to move entirely to qt6.
I’ve found another hint. Apparently in Windows there is this setting called “Scale” in the display settings menu. By default it was set to 125% on my laptop (this was also the recommended setting). I have now set it to 100% and suddenly the axes issue is gone.
Aha! This all very helpful. I will test locally with the “Scale” setting.
I appreciate your patience and feedback. Users like you help make MFiX better for everyone.