Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the phi(m) function. #470

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix the phi(m) function. #470

wants to merge 2 commits into from

Conversation

rdrehmel
Copy link

It seems to me that the following comment in pgfplotscolormap.code.tex

% Step 1: perform lookup. Map #4 into the colormap's range
% using the linear trafo
% phi(#4) = ( #4 - #1 ) / (#2-#1) * colormaprange(#5).

is correct and the documentation is not.

Comment on lines 3919 to +3921
\[ \phi\colon [m_{\min},m_{\max}] \to [0,1000] \]
with
\[ \phi(m) = \frac{m - m_{\min}} {1000} \]
\[ \phi(m) = \frac{m - m_{\min}}{m_{\max} - m_{\min}} \cdot 1000 \]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe replace \min and \max with \text{min} and \text{max}, respectively.

@Mo-Gul What's your opinion? I saw the \min and \max was used by you in c1f06d2,
c1f06d2#diff-6e962382adf5c2d217286bdc2b2c609882e7401ed126f5d7fecf61f550e1f9ba.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@muzimuzhi, why shouldn't we use the predefined mathematical functions \min and \max?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was afraid the extra treatments for mathematical functions (i.e. wrapping in \mathop) would interfere the spacing. I checked and it seems using \min/\max solely in subscripts gave the same spacing as \text{min}/\text{max}.

Not a big deal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants