Making a tikzpicture a figure sends it to next page
I made a pie chart in my document. When it's not in a figure, everything is fine, the tikzpicture is between the two paragraphs I want. When I make it a figure, it goes to next page:
begin{figure}[!h]
begin{center}
begin{tikzpicture}[nodes = {font=sffamily}]
foreach percent/name in {
81.5/Données reprises,
18.5/Nouvelles données
} {
ifxpercentemptyelse % If percent is empty, do nothing
globaladvancecyclecount by 1 % Advance cyclecount
globaladvanceind by 1 % Advance list index
ifnum3<cyclecount % If cyclecount is larger than list
globalcyclecount=0 % reset cyclecount and
globalind=0 % reset list index
fi
pgfmathparse{cyclelist[theind]} % Get color from cycle list
edefcolor{pgfmathresult} % and store as color
% Draw angle and set labels
draw[fill={color!50},draw={color}] (0,0) -- (angle:radius)
arc (angle:angle+percent*3.6:radius) -- cycle;
node at (angle+0.5*percent*3.6:0.7*radius) {percent,%};
node[pin=angle+0.5*percent*3.6:name]
at (angle+0.5*percent*3.6:radius) {};
pgfmathparse{angle+percent*3.6} % Advance angle
xdefangle{pgfmathresult} % and store in angle
fi
};
end{tikzpicture}
end{center}
caption{Taux de propreté de la donnée}
label{Taux de propreté de la donnée}
end{figure}
Is there a way to solve this?
Before posting, I checked the other questions, the solution mentionning the "float" is not acceptable for me because I don't want the space between paragraphs to change along the document.
Thanks :)
tikz-pgf page-breaking
New contributor
add a comment |
I made a pie chart in my document. When it's not in a figure, everything is fine, the tikzpicture is between the two paragraphs I want. When I make it a figure, it goes to next page:
begin{figure}[!h]
begin{center}
begin{tikzpicture}[nodes = {font=sffamily}]
foreach percent/name in {
81.5/Données reprises,
18.5/Nouvelles données
} {
ifxpercentemptyelse % If percent is empty, do nothing
globaladvancecyclecount by 1 % Advance cyclecount
globaladvanceind by 1 % Advance list index
ifnum3<cyclecount % If cyclecount is larger than list
globalcyclecount=0 % reset cyclecount and
globalind=0 % reset list index
fi
pgfmathparse{cyclelist[theind]} % Get color from cycle list
edefcolor{pgfmathresult} % and store as color
% Draw angle and set labels
draw[fill={color!50},draw={color}] (0,0) -- (angle:radius)
arc (angle:angle+percent*3.6:radius) -- cycle;
node at (angle+0.5*percent*3.6:0.7*radius) {percent,%};
node[pin=angle+0.5*percent*3.6:name]
at (angle+0.5*percent*3.6:radius) {};
pgfmathparse{angle+percent*3.6} % Advance angle
xdefangle{pgfmathresult} % and store in angle
fi
};
end{tikzpicture}
end{center}
caption{Taux de propreté de la donnée}
label{Taux de propreté de la donnée}
end{figure}
Is there a way to solve this?
Before posting, I checked the other questions, the solution mentionning the "float" is not acceptable for me because I don't want the space between paragraphs to change along the document.
Thanks :)
tikz-pgf page-breaking
New contributor
add a comment |
I made a pie chart in my document. When it's not in a figure, everything is fine, the tikzpicture is between the two paragraphs I want. When I make it a figure, it goes to next page:
begin{figure}[!h]
begin{center}
begin{tikzpicture}[nodes = {font=sffamily}]
foreach percent/name in {
81.5/Données reprises,
18.5/Nouvelles données
} {
ifxpercentemptyelse % If percent is empty, do nothing
globaladvancecyclecount by 1 % Advance cyclecount
globaladvanceind by 1 % Advance list index
ifnum3<cyclecount % If cyclecount is larger than list
globalcyclecount=0 % reset cyclecount and
globalind=0 % reset list index
fi
pgfmathparse{cyclelist[theind]} % Get color from cycle list
edefcolor{pgfmathresult} % and store as color
% Draw angle and set labels
draw[fill={color!50},draw={color}] (0,0) -- (angle:radius)
arc (angle:angle+percent*3.6:radius) -- cycle;
node at (angle+0.5*percent*3.6:0.7*radius) {percent,%};
node[pin=angle+0.5*percent*3.6:name]
at (angle+0.5*percent*3.6:radius) {};
pgfmathparse{angle+percent*3.6} % Advance angle
xdefangle{pgfmathresult} % and store in angle
fi
};
end{tikzpicture}
end{center}
caption{Taux de propreté de la donnée}
label{Taux de propreté de la donnée}
end{figure}
Is there a way to solve this?
Before posting, I checked the other questions, the solution mentionning the "float" is not acceptable for me because I don't want the space between paragraphs to change along the document.
Thanks :)
tikz-pgf page-breaking
New contributor
I made a pie chart in my document. When it's not in a figure, everything is fine, the tikzpicture is between the two paragraphs I want. When I make it a figure, it goes to next page:
begin{figure}[!h]
begin{center}
begin{tikzpicture}[nodes = {font=sffamily}]
foreach percent/name in {
81.5/Données reprises,
18.5/Nouvelles données
} {
ifxpercentemptyelse % If percent is empty, do nothing
globaladvancecyclecount by 1 % Advance cyclecount
globaladvanceind by 1 % Advance list index
ifnum3<cyclecount % If cyclecount is larger than list
globalcyclecount=0 % reset cyclecount and
globalind=0 % reset list index
fi
pgfmathparse{cyclelist[theind]} % Get color from cycle list
edefcolor{pgfmathresult} % and store as color
% Draw angle and set labels
draw[fill={color!50},draw={color}] (0,0) -- (angle:radius)
arc (angle:angle+percent*3.6:radius) -- cycle;
node at (angle+0.5*percent*3.6:0.7*radius) {percent,%};
node[pin=angle+0.5*percent*3.6:name]
at (angle+0.5*percent*3.6:radius) {};
pgfmathparse{angle+percent*3.6} % Advance angle
xdefangle{pgfmathresult} % and store in angle
fi
};
end{tikzpicture}
end{center}
caption{Taux de propreté de la donnée}
label{Taux de propreté de la donnée}
end{figure}
Is there a way to solve this?
Before posting, I checked the other questions, the solution mentionning the "float" is not acceptable for me because I don't want the space between paragraphs to change along the document.
Thanks :)
tikz-pgf page-breaking
tikz-pgf page-breaking
New contributor
New contributor
New contributor
asked 4 mins ago
djcaesar9114djcaesar9114
83
83
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "85"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});
}
});
djcaesar9114 is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474463%2fmaking-a-tikzpicture-a-figure-sends-it-to-next-page%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
djcaesar9114 is a new contributor. Be nice, and check out our Code of Conduct.
djcaesar9114 is a new contributor. Be nice, and check out our Code of Conduct.
djcaesar9114 is a new contributor. Be nice, and check out our Code of Conduct.
djcaesar9114 is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to TeX - LaTeX Stack Exchange!
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f474463%2fmaking-a-tikzpicture-a-figure-sends-it-to-next-page%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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