|
[Sponsors] |
January 10, 2021, 19:49 |
PyFoam on macOS
|
#1 |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Hello all,
I have issues running pyFoamPlotWatcher.py on macOS. (installed thru pip) Code:
gnuplot> set terminal aqua gnuplot> set terminal aqua line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal x11 noraise noenhanced gnuplot> set terminal x11 noraise noenhanced line 0: line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal x11 title "pyFoam: Bounded variables" line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal x11 title "pyFoam: Continuity" line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal aqua line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal x11 noraise noenhanced line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal x11 title "pyFoam: Residuals" line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list However brew install gnuplot --with-qt or --with-x11 is now deprecated. https://stackoverflow.com/questions/...11-not-working Is there any solution to get PyFoam supported on macOS? The author uses mercurial for source code and I don't even know how to submit an issue! Thanks in advance. |
|
January 13, 2021, 20:31 |
|
#2 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
I don't have access to an up to date Mac anymore so I can only guess There is a setting that allows specifying the terminal to be used in Gnuplot. So it might be fixed by putting Code:
[Plotting] gnuplot_terminal: x11 into a file ~/.pyFoam/pyfoamrc and replace x11 with whatever is now the default terminal to use in Gnuplot on a Mac
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 13, 2021, 21:28 |
|
#3 | |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Quote:
Code:
Error in /usr/local/bin/pyFoamPlotWatcher.py : FatalError in PyFoam: 'PyFoam FAT AL ERROR on line 52 of file /usr/local/lib/python3.9/site-packages/PyFoam/Basic s/PlotTimelinesFactory.py: Terminal qt not in list of valid terminals x11, wxt, caca, dumb, aqua' Code:
Available terminal types: cairolatex LaTeX picture environment using graphicx package and Cairo backend canvas HTML Canvas object cgm Computer Graphics Metafile context ConTeXt with MetaFun (for PDF documents) domterm DomTerm terminal emulator with embedded SVG dumb ascii art for anything that prints text dxf dxf-file for AutoCad (default size 120x80) emf Enhanced Metafile format epscairo eps terminal based on cairo epslatex LaTeX picture environment using graphicx package fig FIG graphics language V3.2 for XFIG graphics editor gif GIF images using libgd and TrueType fonts hpgl HP7475 and relatives [number of pens] [eject] jpeg JPEG images using libgd and TrueType fonts lua Lua generic terminal driver mf Metafont plotting standard mp MetaPost plotting standard pcl5 PCL5e/PCL5c printers using HP-GL/2 pdfcairo pdf terminal based on cairo pict2e LaTeX2e picture environment png PNG images using libgd and TrueType fonts pngcairo png terminal based on cairo postscript PostScript graphics, including EPSF embedded files (*.eps) pslatex LaTeX picture environment with PostScript \specials pstex plain TeX with PostScript \specials pstricks LaTeX picture environment with PSTricks macros qt Qt cross-platform interactive terminal sixelgd sixel using libgd and TrueType fonts svg W3C Scalable Vector Graphics tek40xx Tektronix 4010 and others; most TEK emulators tek410x Tektronix 4106, 4107, 4109 and 420X terminals texdraw LaTeX texdraw environment tikz TeX TikZ graphics macros via the lua script driver tkcanvas Tk canvas widget unknown Unknown terminal type - not a plotting device vttek VT-like tek40xx terminal emulator xterm Xterm Tektronix 4014 Mode Screen Shot 2021-01-13 at 8.24.31 PM.jpg Which is definitely not what I want. I guess this will be a simple fix, by setting the terminal to qt if the system is macOS, but I'm not a pro in python. |
||
January 14, 2021, 04:24 |
|
#4 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Go to the file /usr/local/lib/python3.9/site-packages/PyFoam/Basics/GnuplotTimelines.py line 16. Extend the variable terms with the terminal qt Code:
terms=["x11","wxt","caca","dumb","qt"] Side note: the reason why PyFoam has a list of valid terminals is to prevent people from specifying a terminal "png" and ending up with an unusable terminal PS: I think terminal "dumb" is really cool
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 14, 2021, 10:34 |
|
#5 | |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Quote:
Code:
terms=["x11","wxt","caca","dumb"] if uname()[0]=="Darwin": terms.append("qt") return terms I still got some error messages Code:
gnuplot> set terminal aqua gnuplot> set terminal aqua ^ line 0: ^ unknown or ambiguous terminal type; type just 'set terminal' for a list line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list gnuplot> set terminal aqua ^ line 0: unknown or ambiguous terminal type; type just 'set terminal' for a list qt.qpa.fonts: Populating font family aliases took 230 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost. qt.qpa.fonts: Populating font family aliases took 230 ms. Replace uses of missing font family "Sans" with one that exists to avoid this cost. Screen Shot 2021-01-14 at 9.27.24 AM.png |
||
January 14, 2021, 15:28 |
|
#6 | |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
Quote:
Aqua was this: https://sourceforge.net/projects/aquaterm/ That used to be "standard" for gnuplot on Mac OS X if you didn't use X11 I must check. I think I gave "aqua" a special treatment on darwin so that it used x11 if X11 was started (much faster) and otherwise fell back to aqua
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request |
||
January 14, 2021, 15:45 |
|
#7 | |
Senior Member
Join Date: Jun 2016
Posts: 102
Rep Power: 10 |
Quote:
|
||
April 14, 2022, 00:42 |
Solution using qt instead of x11 or dumb on up to date Macos (M1 INCLUDED)
|
#8 |
New Member
Guanda CHENG
Join Date: Apr 2022
Posts: 1
Rep Power: 0 |
Thanks to your discussion with gschaider, I've found the final solution by adopting only a few changes to the file 'GnuplotTimelines.py' using qt.
Here is the solution. What you need to do is just a few modifications for the terms marked red: Code:
def __init__(self, timelines, custom, terminal="qt", showWindow=True, quiet=False, registry=None): GeneralPlotTimelines.__init__(self,timelines,custom,showWindow=showWindow,registry=registry) Gnuplot.__init__(self, persist=self.spec.persist, quiet=quiet) self.itemlist=[] self.terminal="qt" |
|
Tags |
pyfoam |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[PyFoam] PyFoam 6.6.9 installation problems | klausb | OpenFOAM Community Contributions | 2 | October 2, 2022 06:56 |
[PyFoam] PyFoam BasicRunner producing LinuxMem error | tas38 | OpenFOAM Community Contributions | 2 | October 5, 2016 12:29 |
[PyFoam] having problems with pyfoam Installation | vitorspadetoventurin | OpenFOAM Community Contributions | 3 | December 2, 2014 08:18 |
[PyFoam] How to extract values with pyFoam? | chriss85 | OpenFOAM Community Contributions | 13 | January 27, 2014 21:16 |
pyFoam, pyFlu, extend: How does they relate? | Horus | OpenFOAM | 9 | May 21, 2011 13:49 |