Matplotlib puts a wrong latex symbol when I savefig() a plot to epsHow to change the font size on a matplotlib plotSaving interactive Matplotlib figuresHow to put the legend out of the plotWhen to use cla(), clf() or close() for clearing a plot in matplotlib?Save plot to image file instead of displaying it using Matplotlibmatplotlib savefig doesn't work when run with crontabHow to make IPython notebook matplotlib plot inlinematplotlib: latex: savefig: OSError no such file or directoryI can not save a plot in pdf format using MatplotlibHow to pgf savefig matplotlib figure with multiple imshow plots as *.svg and not *.png?

Is it better to deliver many low-value stories or few high-value stories?

Strange LED behavior

Do I care if the housing market has gone up or down, if I'm moving from one house to another?

Why is DC so, so, so Democratic?

Does Mathematica 12 support GT 730 CUDA?

Please let me know why 2/16 has a remainder of 2. Thanks

Is it better to have a 10 year gap or a bad reference?

What would be the effects of (relatively) widespread precognition on the stock market?

Does switching on an old games console without a cartridge damage it?

As the Ferris wheel turns

Calculating Fibonacci sequence in several different ways

Why does the salt in the oceans not sink to the bottom?

Oriented vector bundle with odd-dimensional fibers

Can "Taking algebraic closure" be made into a functor?

How do you structure large embedded projects?

What should I watch before playing Alien: Isolation?

Source for "everyone has a specific area of Torah that they're naturally drawn to"

Importance of moon phases for Apollo missions

Storyboarding Approaches for the Non-Artistic

Considerations when providing money to only one child out of two

Why is there an extra "t" in Lemmatization?

Host telling me to cancel my booking in exchange for a discount?

Is it better to merge "often" or only after completion do a big merge of feature branches?

I am a dual citizen of United States and Mexico, can I use my Mexican license in california when visiting?



Matplotlib puts a wrong latex symbol when I savefig() a plot to eps


How to change the font size on a matplotlib plotSaving interactive Matplotlib figuresHow to put the legend out of the plotWhen to use cla(), clf() or close() for clearing a plot in matplotlib?Save plot to image file instead of displaying it using Matplotlibmatplotlib savefig doesn't work when run with crontabHow to make IPython notebook matplotlib plot inlinematplotlib: latex: savefig: OSError no such file or directoryI can not save a plot in pdf format using MatplotlibHow to pgf savefig matplotlib figure with multiple imshow plots as *.svg and not *.png?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















When I save a matplotlib plot as an eps-file with a LaTex plus-minus sign (pm) in an annotation it somehow appears as a degree symbol instead.



So the code



figure.annotate(s=r"$pm$")


basically works as



figure.annotate(s=r"$degree$")


Has anyone seen this behaviour?



Some additional info:



  • This only happens when I save a plot into .eps file. Both the plot itself and .png files look just fine.

  • This only happens when I add

matplotlib.rcParams['pdf.fonttype'] = 42
matplotlib.rcParams['ps.fonttype'] = 42
matplotlib.rcParams['ps.useafm'] = True


to the beginning of my script. Without this settings everything works fine, but I need this fonttype=42 configuration to avoid Type3 fonts in the resulting image, because the publisher does not allow them.



  • This only happens for Win7 (Conda installation, everything appears to be up to date). For Arch Linux it works fine. So the problem is most probably Windows-related. Unfortunately I do not know much about Windows. I'm developing this script under Arch and a colleague, who uses Win, asked me to share the script, so it is difficult for me to troubleshoot the problem, because I do not have this system on my hands.









share|improve this question




























    0















    When I save a matplotlib plot as an eps-file with a LaTex plus-minus sign (pm) in an annotation it somehow appears as a degree symbol instead.



    So the code



    figure.annotate(s=r"$pm$")


    basically works as



    figure.annotate(s=r"$degree$")


    Has anyone seen this behaviour?



    Some additional info:



    • This only happens when I save a plot into .eps file. Both the plot itself and .png files look just fine.

    • This only happens when I add

    matplotlib.rcParams['pdf.fonttype'] = 42
    matplotlib.rcParams['ps.fonttype'] = 42
    matplotlib.rcParams['ps.useafm'] = True


    to the beginning of my script. Without this settings everything works fine, but I need this fonttype=42 configuration to avoid Type3 fonts in the resulting image, because the publisher does not allow them.



    • This only happens for Win7 (Conda installation, everything appears to be up to date). For Arch Linux it works fine. So the problem is most probably Windows-related. Unfortunately I do not know much about Windows. I'm developing this script under Arch and a colleague, who uses Win, asked me to share the script, so it is difficult for me to troubleshoot the problem, because I do not have this system on my hands.









    share|improve this question
























      0












      0








      0








      When I save a matplotlib plot as an eps-file with a LaTex plus-minus sign (pm) in an annotation it somehow appears as a degree symbol instead.



      So the code



      figure.annotate(s=r"$pm$")


      basically works as



      figure.annotate(s=r"$degree$")


      Has anyone seen this behaviour?



      Some additional info:



      • This only happens when I save a plot into .eps file. Both the plot itself and .png files look just fine.

      • This only happens when I add

      matplotlib.rcParams['pdf.fonttype'] = 42
      matplotlib.rcParams['ps.fonttype'] = 42
      matplotlib.rcParams['ps.useafm'] = True


      to the beginning of my script. Without this settings everything works fine, but I need this fonttype=42 configuration to avoid Type3 fonts in the resulting image, because the publisher does not allow them.



      • This only happens for Win7 (Conda installation, everything appears to be up to date). For Arch Linux it works fine. So the problem is most probably Windows-related. Unfortunately I do not know much about Windows. I'm developing this script under Arch and a colleague, who uses Win, asked me to share the script, so it is difficult for me to troubleshoot the problem, because I do not have this system on my hands.









      share|improve this question














      When I save a matplotlib plot as an eps-file with a LaTex plus-minus sign (pm) in an annotation it somehow appears as a degree symbol instead.



      So the code



      figure.annotate(s=r"$pm$")


      basically works as



      figure.annotate(s=r"$degree$")


      Has anyone seen this behaviour?



      Some additional info:



      • This only happens when I save a plot into .eps file. Both the plot itself and .png files look just fine.

      • This only happens when I add

      matplotlib.rcParams['pdf.fonttype'] = 42
      matplotlib.rcParams['ps.fonttype'] = 42
      matplotlib.rcParams['ps.useafm'] = True


      to the beginning of my script. Without this settings everything works fine, but I need this fonttype=42 configuration to avoid Type3 fonts in the resulting image, because the publisher does not allow them.



      • This only happens for Win7 (Conda installation, everything appears to be up to date). For Arch Linux it works fine. So the problem is most probably Windows-related. Unfortunately I do not know much about Windows. I'm developing this script under Arch and a colleague, who uses Win, asked me to share the script, so it is difficult for me to troubleshoot the problem, because I do not have this system on my hands.






      python matplotlib latex






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Mar 26 at 13:29









      Sergey SavchenkoSergey Savchenko

      959 bronze badges




      959 bronze badges






















          0






          active

          oldest

          votes










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358397%2fmatplotlib-puts-a-wrong-latex-symbol-when-i-savefig-a-plot-to-eps%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes




          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







          Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid …


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55358397%2fmatplotlib-puts-a-wrong-latex-symbol-when-i-savefig-a-plot-to-eps%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

          155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

          Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?