Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. ViewBox, AxisItem and PlotItem (from GraphicsWidget) do not adapt their size to the new screen

ViewBox, AxisItem and PlotItem (from GraphicsWidget) do not adapt their size to the new screen

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 607 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    guillermollopis
    wrote on 27 Jul 2023, 07:57 last edited by
    #1

    I am using palms (https://github.com/PALMS-gui/PALMS) to plot a signal in python. This program has a class named plot_area.py in which they define the things they use to plot. I think the important ones are a ViewBox, AxisItem and PlotItem (all inherite from GraphicsWidget). The program in principle works well, you can see the plot with the axis and a grid with the proper values. first_moemnt.png ! The problem is that if I run the program on a different screen (in my case, I have the laptop connected to a second screen), the grid and the axis keep the original size. We can see that on the first image. The plot seems fine and takes all the new space, but the axis and grid are reduced. After scrolling a bit the signal, the grid gets smaller and eventually disappears.
    after_scrolling.png
    I've been trying to fix this but I feel I haven't done any progress and I have no clue where the problem is originating. I would really appreciate some ideas on where the problem might be or any similar experiences. Thank you so much!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 27 Jul 2023, 19:12 last edited by
      #2

      Hi and welcome to devnet,

      I would start by updating the PyQt and Qt versions used.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      G 1 Reply Last reply 27 Jul 2023, 19:47
      0
      • S SGaist
        27 Jul 2023, 19:12

        Hi and welcome to devnet,

        I would start by updating the PyQt and Qt versions used.

        G Offline
        G Offline
        guillermollopis
        wrote on 27 Jul 2023, 19:47 last edited by
        #3

        @SGaist Thank you for your answer. Sadly, this didn't work. I updated everything to the last version available and I have the same issue

        S 1 Reply Last reply 28 Jul 2023, 13:45
        0
        • G guillermollopis
          27 Jul 2023, 19:47

          @SGaist Thank you for your answer. Sadly, this didn't work. I updated everything to the last version available and I have the same issue

          S Offline
          S Offline
          StarterKit
          wrote on 28 Jul 2023, 13:45 last edited by StarterKit
          #4

          @guillermollopis these charts and class names rang a bell for me. I looked into requirements.txt of the project and see it uses pyqtgraph and I think charts are created with help of this library.
          So I would propose you to look into pyqtgraph manuals and especially into examples (you may find how to run them here).
          I think it may give you hints of how to address your problem. Maybe you will have more preciese questions (some guys here and on stackoverflow may answer it with regards to pyqtgraph usage...)

          1 Reply Last reply
          0

          3/4

          27 Jul 2023, 19:47

          • Login

          • Login or register to search.
          3 out of 4
          • First post
            3/4
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved