-
Notifications
You must be signed in to change notification settings - Fork 36
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
histogram puts value into wrong bin #437
Comments
With As a workaround specifically for your example, using Digging deeper, your example can be reduced to a \documentclass{article}
\usepackage{pgf}
\usepgflibrary{fpu}
\begin{document}
\makeatletter
\pgfmathfloatdivide@{1Y1.0e0]}{1Y9.0e0]} \pgfmathresult\par % = 1Y1.111e-1
\pgfmathfloatdivide@{1Y2.0e0]}{1Y1.8e1]} \pgfmathresult\par % = 1Y1.1111e-1, more accurate
\makeatother
\end{document}
It seems the accuracy of either |
Another workaround: redefine \makeatletter
\def\pgfmath@basic@divide@#1#2{\edef\pgfmathresult{\csname fp_eval:n\endcsname{#1/#2}}}
\makeatother |
Hi muzimuzhi, using your workaround \fp_eval:n for divisions did work for me! Thank you so much!!! regards, |
Duplicate of pgf-tikz/pgf#1148 |
I'm using
Package: pgfplots 2021/05/15 v1.18.1 Data Visualization (1.18.1)
According to the documentation the bins should be half open.
The following code creates a histogram with the bins
10-19, 19-28, 28-37, 37-46, 46-55
If I understand it correct a value of 28 should be put in the 3rd bin.
But it is put in the second.
A value of 19 is being put correctly in the second bin.
From my observation all endpoints except of the first and last bin are affected.
This example shows the problem:
Do I miss something or is this a bug in pgfplots?
Any help would be appreciated.
Regards,
Ralf
The text was updated successfully, but these errors were encountered: