#StackBounty: #pgfplots #pgfmath pgfplots: x vs x

Bounty: 50

  • This question is a follow-up to this question ("pgfplots: Strange Bump in tanh Function").
  • Stefan Pinnow, who knows a thing or two about pgfplots, provided an answer that distinguished between addplot{tanh(x)}; and addplot{tanh(x)};(x vs x as the argument).
  • In a comment, Stefan stated "My thought also was that tanh(x) is the same as tanh(x) but it seems that Lua "doesn’t like" "commands", i.e. <something>. But to my experience I never used x in addplot calls. Since this is easier to read and easier to type […]".
     % use TeX as calculation engine
     addplot {tanh(x)};
     % use Lua as calculation engine (when compiled with LuaLaTeX of course)
     addplot+ [very thick] {tanh(x)};
    
  • The current pgfplots manual (Revision 1.18.1 (2021/05/15)) states in Chapter 4.3.3 (Computing Coordinates with Mathematical Expressions): "In short: it is the same whether you write x or just x inside of math expressions.".

enter image description here

  • Question: In what circumstances does it matter whether I use x or x in an addplot argument?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.