Coder Social home page Coder Social logo

Comments (9)

alandefreitas avatar alandefreitas commented on May 13, 2024

Hi @PJ127 , Thanks for the feedback.

Do you know which is your default gnuplot terminal? (You can find that out with gnuplot --term)

Which installer did you use? To what directory was libmatplot.dll sent initially?

from matplotplusplus.

xnorpx avatar xnorpx commented on May 13, 2024

wxt term works best for me in Windows. QT was slow and Windows one I experience similar issues as described here.

from matplotplusplus.

PJ127 avatar PJ127 commented on May 13, 2024

Hello @alandefreitas .
Thank you for your answer.
My gnuplot indicates: "Version 5.2 patchlevel 8 last modified 2019-12-01" (gnuplot --term does not return anything)

I installed the lib with cmake on a msys2 terminal:

git clone http://github.com/alandefreitas/matplotplusplus
cd matplotplusplus/
mkdir compil-release && cd compil-release 
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DCMAKE_INSTALL_PREFIX="${REP_BIB}/matplot1.0.1" 
make -j4 && make install

I had to manually copy the .lib or the .dll (shared mode):

cp source\matplot\Release\matplot.dll "${REP_BIB}/matplot1.0.1/lib" 

from matplotplusplus.

alandefreitas avatar alandefreitas commented on May 13, 2024

@PJ127
I'm sorry. The command should be gnuplot -e "show term".
It seems like Qt is the default gnuplot terminal on windows but some people are complaining it's a little problematic.

If it's Qt, maybe you can try what @xnorpx recommended above.
You should be able to change your default terminal with these instructions or by changing the environment variable GNUTERM.

You can also change the terminal directly on matplot++ but I wouldn't recommend that.
It's more complicated and your code would become be less portable.

Regarding the installer, if you run:

cmake --install .

cmake will try to find your default directory for libraries, but that's not perfect. There are lots of systems where it can't do that for lots of different reasons. I included some more instructions in the documentation this week.

Did it really install the library in source\matplot\Release\? Because that's where the binaries should be before installing the library.

@xnorpx
Is that also your experience? Do you think it would be reasonable to force matplot++ to use wxt as the default terminal on windows? Or would that be too much?

from matplotplusplus.

PJ127 avatar PJ127 commented on May 13, 2024
 terminal type is windows 0 color solid butt enhanced standalone

Terminal is Windows, and not Qt (GNUTERM=qt with your command line returns terminal type is unknown, and same for x11 by the way).

Setting GNUTERM=wxt in my env makes the plot visible and accessible, thank you very much!

No, you are right, the .dll was created in source\matplot during the build, but never installed anywhere (libmatplot.dll.a was installed correctly though); therefore I had to manually copy the dll.

Note: when using Visual Compilation instead of Unix Makefiles, the problem did not appear, and the .lib was installed correctly.

from matplotplusplus.

xnorpx avatar xnorpx commented on May 13, 2024

@alandefreitas

Since we now have 2 instances of this happening and wxt seems to work better. I think it's fair to try to force it to wxt on windows with comments why and choice for people to change. (most users of this lib probably just want it to work and pre configure it to do just that would be great I think)

from matplotplusplus.

alandefreitas avatar alandefreitas commented on May 13, 2024

OK. I'll do that. It's not that simple because the implemention has to make sure wxt is available and the user hasn't explicitly chosen another default terminal before setting the terminal to wxt, but it's possible.

from matplotplusplus.

codygray avatar codygray commented on May 13, 2024

I reproduce on Windows 10 with Gnuplot v5.2.8 with GNUTERM set to windows. It seems that there is a bug in Gnuplot, where when it is rendering with the windows terminal, it moves the plot window off the screen. I suspect this may be a multiple monitor bug; I don't have any single-monitor systems to test on for the purposes of confirming this theory.

Indeed, the problem goes away when setting GNUTERM to wxt. (With GNUTERM set to qt, I do get a plot window, but no lines are displayed. So, it works even less well.) I have no issue with making wxt the default, but things like this create an extraordinarily bad user experience. Worse, they seem to be things outside of the control of Matplotplusplus, which highlights the disadvantage of depending on third-party executables like Gnuplot.

from matplotplusplus.

alandefreitas avatar alandefreitas commented on May 13, 2024

That's interesting. If GNUTERM doesn't exists, it should go to wxt on windows:

from matplotplusplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.