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.


    Matplotlib unicode(Greek) letters

    Pythonista
    5
    11
    9190
    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.
    • miou1974
      miou1974 last edited by

      Is it possible to have Greek letters in titles and legends of matplotlib? I have tried various methods without success

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

        Sorry, I could not help myself. Can't answer your question, but it would be a little strange if it was not possible given so much mathematics are Greek.

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

          Actually it is possible to print Greek letters for math expressions by using r'$\Delta$' for Δ for example but i want to use free Greek text like u'Ψωμί'.

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

            I have not tried it, but you might try:

            matplotlib.rcParams['text.usetex'] = True
            matplotlib.rcParams['text.latex.unicode'] = True
            

            You could also try setting usetex to false.

            I don't know if the backend that comes with pythonista supports unicode or not.

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

              The matplotlib Unicode demo works out of the box with accents, umlauts, etc. but those pesky Greek characters just appear as squares.

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

                @ccc Greek. Typo there. Try this http://stackoverflow.com/questions/13338550/typing-greek-letters-etc-in-python-plots

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

                  I fixed the typo. I had already looked at that stack overflow page but I still could not get it to work.

                  1 Reply Last reply Reply Quote 1
                  • miou1974
                    miou1974 last edited by

                    The following may work:
                    matplotlib.pyplot.rc('font', family='arial')
                    How can I find the fonts supported by iPad?
                    Arial does not work on ipad but I managed to print Greek letters on Windows this way.

                    Webmaster4o 1 Reply Last reply Reply Quote 0
                    • Webmaster4o
                      Webmaster4o @miou1974 last edited by

                      @miou1974 There has been past discussion on this, search the forum for "font". Also, iosfonts.com

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

                        How can I find the fonts supported by iPad?

                        Open a Pythonista editor can click inside that editor so the insertion cursor is flashing in the text. In the upper left, click on the +-inside-a-box icon. Click "Fonts" at the bottom and scroll thru the fonts. Arial is there but does not do what you want :-( Maybe Symbol or Zapf Dingbats, etc.

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

                          The following worked for me

                          matplotlib.pyplot.rc('font', family='STIXGeneral')
                          
                          1 Reply Last reply Reply Quote 3
                          • First post
                            Last post
                          Powered by NodeBB Forums | Contributors