omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    Upgrade matplotlib to the latest

    Pythonista
    4
    6
    4348
    Loading More Posts
    • 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.
    • craftmojo
      craftmojo last edited by

      I manage to download the latest matplotlib 1.5.1 using pipista. However, I dont know how to replace current matplotlib (1.3) and using it in my code.

      I couldnt run below code using current matplotlib:
      import numpy as np
      import matplotlib.pyplot as plt
      from matplotlib import style
      style.use("ggplot")

      x = [1, 5, 1.5, 8, 1, 9]
      y = [2, 8, 1.8, 8, 0.6, 11]

      plt.scatter(x,y)
      plt.show()

      Any help would be appreciated.

      Many Thanks.

      1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        I believe that you need to put it in site-packages And then quit and relaunch Pythonista.

        import matplotlib
        print(matplotlib.__version__)
        print(matplotlib.__version__numpy__)
        
        1 Reply Last reply Reply Quote 0
        • craftmojo
          craftmojo last edited by

          Do I need extract the downloaded file (tar.gz) and then place it inside site-packages ?

          1 Reply Last reply Reply Quote 0
          • JonB
            JonB last edited by

            it is not obvious that you can upgrade matplotlib. Much of matplotlib is c code, and version 1.3 to 1.5 had changes to thousands of lines of c. While you might get some bits to work, it seems unlikely it will behave as 1.5 is supposed to.

            1 Reply Last reply Reply Quote 2
            • craftmojo
              craftmojo last edited by

              Thanks for the answer.
              Is there any workaround, so I can use 1.5 lib for my code ?
              How about upgrade other modules like numpy, or install new module like sklearn.
              Is it possible ?

              1 Reply Last reply Reply Quote 0
              • dgelessus
                dgelessus last edited by dgelessus

                No, you can only install pure Python modules yourself. Modules such as numpy and matplotlib that use C, Cython, Fortran or other compiled languages need to be integrated into Pythonista by omz, because Apple's app guidelines do not allow compiling native code in an app, and simply because there are no C compilers for iOS on iOS.

                1 Reply Last reply Reply Quote 1
                • First post
                  Last post
                Powered by NodeBB Forums | Contributors