Closed certik closed 3 years ago
Hi @certik I have not a MacOS machine to test and all my tests were on Windows and Ubuntu! but I will investigate!
@LKedward - would you have a look?
I can debug this too. Thank you @kookma for the library!
Thank you @certik! So please update me here! I am not sure but I think something goes wrong with wxt
terminal (on MacOS) here!
Also please test with qt
terminal!
set terminal qt
set title "Some Math Functions"
set xrange [-10:10]
set yrange [-2:2]
set zeroaxis
plot (x/4)**2, sin(x), 1/x
See for example https://apple.stackexchange.com/questions/103814/cant-plot-with-gnuplot-on-my-mac
I had no issue report for wxt on MacOS and I assumed it should work as default terminal on Windows/Linux/MacOS.
Side note:
issue the below command to see what terminals are available on your system!
set terminal
@LKedward - would you have a look?
Apologies, I don't have a Mac and so I wasn't able to test on MacOS unfortunately.
@LKedward No problem. It is not related to FPM! It seems something goes wrong with terminal!
Thank you!
With qt
I get:
gnuplot> set terminal qt
Terminal type is now 'qt'
gnuplot> set title "Some Math Functions"
gnuplot> set xrange [-10:10]
gnuplot> set yrange [-2:2]
gnuplot> set zeroaxis
gnuplot> plot (x/4)**2, sin(x), 1/x
Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4
Did you set environmental variable GNUPLOT_DRIVER_DIR?
Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4
Did you set environmental variable GNUPLOT_DRIVER_DIR?
Here are the available terminals:
gnuplot> set terminal
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
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
tkcanvas Tk canvas widget
unknown Unknown terminal type - not a plotting device
vttek VT-like tek40xx terminal emulator
xterm Xterm Tektronix 4014 Mode
Here are the available terminals:
Hi @certik - the report shows you have not wxt
terminal installed! but you have qt
Qt cross-platform interactive terminal
So technically to this point you should be able to plot using qt
Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4 Did you set environmental variable GNUPLOT_DRIVER_DIR? Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4 Did you set environmental variable GNUPLOT_DRIVER_DIR?
When you start a clean session of gnuplot using the below command shall display your default terminal
show terminal
By the way you have qt
terminal but it can not call it correctly!
To see if you can plot, from your list of available terminal I use png terminal. Please execute the below example and let me know if you get the correct output
set terminal png size 400,300
set output 'test.png'
set title "Some Math Functions"
set xrange [-10:10]
set yrange [-2:2]
set zeroaxis
plot (x/4)**2, sin(x), 1/x
Gnuplot shall produce a test.png and you should get something like below
The png
terminal works and saves the png image.
The default terminal is qt
, but it does not work due to the errors:
Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4
Did you set environmental variable GNUPLOT_DRIVER_DIR?
Could not start gnuplot_qt with path /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4
Did you set environmental variable GNUPLOT_DRIVER_DIR?
The executable /Users/certik/miniforge3/envs/gf/libexec/gnuplot/5.4/gnuplot_qt
is there and seems to work (it opens up an application with a menu but no windows and I assume if it was used to plot something, it would show it). So I don't know what the problem is.
Hi @certik - So gnuplot works fine! but not for qt terminal! I am sorry I cannot help more as I do not have a MacOS. But as I see the error is not related with ogpf! I have read on the net there are ways to install gnuplot+wxt on macos
https://stackoverflow.com/questions/13001847/wxt-terminal-for-gnuplot-on-mac-os-x
Please update me if you could resolve the issue!
Well, I think it's always a good idea to provide instructions how to get a library (ogpf in this case) working on all platforms. Even though the problem is in gnuplot, it is related to ogpf, since ogpf depends on gnuplot to work.
Well, I think it's always a good idea to provide instructions how to get a library (ogpf in this case) working on all platforms. Even though the problem is in gnuplot, it is related to ogpf, since ogpf depends on gnuplot to work.
I will add a line and refer users to consult http://www.gnuplot.info/ and have a working gnuplot on their system, then install ogpf! If I want to add all troubleshooting related to working gnuplot on all different operating systems (e.g linus, unix, Windows, macos, ...) it wont make sense here and we repeated gnuplot.info docs here!
Thank you!
The
png
terminal works and saves the png image.
You can change wxt
terminal in examples and use png
instead. This will work for you! Also try to install wxt
from https://stackoverflow.com/questions/13001847/wxt-terminal-for-gnuplot-on-mac-os-x and see how it works.
Thanks @kookma for your help! I've installed gnuplot using Conda, so it would have to be fixed in Conda.
I assume the
gnuplot
does not work or requiresset terminal
on macOS. I used