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

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript