Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3D plot goes in bottom left side of window #785

Closed
Eyshika opened this issue Nov 14, 2018 · 3 comments
Closed

3D plot goes in bottom left side of window #785

Eyshika opened this issue Nov 14, 2018 · 3 comments
Labels
openGL Issues relating to 3D/openGL

Comments

@Eyshika
Copy link

Eyshika commented Nov 14, 2018

Hello! I am trying to do 3D plotting using Pyqtgraph in Python. here is the simple code I ran:

 import pyqtgraph as pg
    import pyqtgraph.opengl as gl
   app=pg.QtGui.QApplication(sys.argv)
   view=gl.GLViewWidget()  
   view.setGeometry(50, 50, 600, 500)
    view.opts['distance'] = 40
    view.setWindowTitle('pyqtgraph example')
    view.show() 
    gx = gl.GLGridItem()
    gx.rotate(90, 0, 1, 0)
    gx.translate(-10, 0, 0)
    view.addItem(gx)
    gy = gl.GLGridItem()
    gy.rotate(90, 1, 0, 0)
    
    gy.translate(0, -10, 0)
    view.addItem(gy)
    gz = gl.GLGridItem()
    gz.translate(0, 0, -10)
    view.addItem(gz)
    app.exec_()

I installed PyQt5 and OPengl using pip
I am running it in MAC in Visual Code

Problem: The output always displays on bottom left side of window when checked on system screen, but displays in middle of window when checked on monitor screen.. What could be the reason ? What are the changes I can or I should do in the code ? Here is the output attached to better explain the issue.
screen shot 2018-11-14 at 9 36 38 am
@campagnola @lesauxvi @gpoulin @ericdill

@daranday
Copy link

+1 Reproducing on Mac High Sierra as well.

@j9ac9k j9ac9k added the openGL Issues relating to 3D/openGL label Jun 24, 2019
@ixjlyons
Copy link
Member

An issue very similar to this showed up on the mailing list recently. Could you try installing from the latest development version? There may still be some OpenGL issues with high DPI displays but I think this specific problem has been fixed (but not released yet).

@j9ac9k
Copy link
Member

j9ac9k commented Jun 26, 2019

Just ran the code attached above (had to add import sys) off of the current develop branch on macOS mojave and got the following result

image

I would say that this issue has likely been addressed; and will be incorporated in the next release. If you can still duplicate this issue from the develop branch, let us know and we'll reopen.

@j9ac9k j9ac9k closed this as completed Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
openGL Issues relating to 3D/openGL
Projects
None yet
Development

No branches or pull requests

4 participants