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

Missing minor ticks #478

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions tex/generic/pgfplots/pgfplotsticks.code.tex
Original file line number Diff line number Diff line change
Expand Up @@ -1033,13 +1033,15 @@
\fi
% X-Axis ticks bottom and top
\ifpgfplots@needsminorloop
% Do not add minor ticks past the last xtick.
% When auto-generating tick positions, an extra tick past the axis
% limit is ensured by \pgfplots@assign@default@tick@foraxis@compute
% so that no minor ticks are omitted in that case.
\ifnum\pgfplots@ticknum=\c@pgfplots@ticknum@last\relax
\else
% SEE BELOW for the 'minor #1tick' feature -- it has a
% separate loop.
\foreach \pgfplots@i in {1,...,\pgfplots@minor@tick@num} {%
% XXX : bug 165 [minor ticks] minor tick drawn after the last xtick
% seems to be here. Does that harm?
\ifpgfplots@islinear
\pgfmathmultiply@{\pgfplots@i}{\pgfplots@minor@tick@dist}%
\else
Expand Down Expand Up @@ -2309,7 +2311,10 @@
%
\if0\pgfplots@tick@returnval@ready
\xdef\pgfplots@glob@TMPb{\pgf@sys@tonumber{\H}}%
\advance\MAX by0.5\H % avoid rounding inaccuracies:
% No minor ticks will be drawn past the last tick, so we
% need to add one H to make sure it is past the axis limit.
% Add an extra H / 2 to avoid rounding inaccuracies.
\advance\MAX by1.5\H
\xdef\pgfplots@glob@TMPa{\pgf@sys@tonumber{\MIN},\pgf@sys@tonumber{\MINH},...,\pgf@sys@tonumber{\MAX}}%
\fi
%\message{final H=\the\H; returning \pgfplots@glob@TMPa.}%
Expand Down