Tikzpicture doesn't display correctlyStacked bar-plot: display total valueUse BPchem Numbering As Labels in a PGFPlotGrouped bar chartHow do I apply nodes near coords to a single bar / to a single plot?How to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphCaption doesn't display correctlypgfplots: percentage in matrix plotpgfplots - |x - 4| + 1 doesn't look correctly

Rampant sharing of authorship among colleagues in the name of "collaboration". Is not taking part in it a death knell for a future in academia?

How did astronauts using rovers tell direction without compasses on the Moon?

Why does the Rust compiler not optimize code assuming that two mutable references cannot alias?

Why put copper in between battery contacts and clamps?

Why is softmax function used to calculate probabilities although we can divide each value by the sum of the vector?

Blank spaces in a font

Is it unprofessional to mention your cover letter and resume are best viewed in Chrome?

How does ssh-copy-id get the public key when only the private key is loaded?

What Marvel character has this 'W' symbol?

My employer is refusing to give me the pay that was advertised after an internal job move

Polish citizen flying from Canada to Honolulu with a layover in Chicago

Can a US President, after impeachment and removal, be re-elected or re-appointed?

Would people understand me speaking German all over Europe?

Why would a personal invisible shield be necessary?

What is the German equivalent of the proverb 水清ければ魚棲まず (if the water is clear, fish won't live there)?

How to improve king safety

Scam? Checks via Email

How does a poisoned arrow combine with the spell Conjure Barrage?

In syntax, why cannot we say things like "he took walked at the park"? but can say "he took a walk at the park"?

Unknown indication below upper stave

Should I accept an invitation to give a talk from someone who might review my proposal?

Prove if n is an odd integer, then 3n is odd.

8086 stack segment and avoiding overflow in interrupts

Argand formula and more for quaternions?



Tikzpicture doesn't display correctly


Stacked bar-plot: display total valueUse BPchem Numbering As Labels in a PGFPlotGrouped bar chartHow do I apply nodes near coords to a single bar / to a single plot?How to prevent rounded and duplicated tick labels in pgfplots with fixed precision?How to hide empty (value 0) ybars with pgfplots?Show mark labels near marks and not centered in ybar interaval graphCaption doesn't display correctlypgfplots: percentage in matrix plotpgfplots - |x - 4| + 1 doesn't look correctly






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








3















I'm new to LaTeX and am struggling with a problem that I cannot fix.



How do I:



  1. get ride of all the number inside the bar,

  2. get rid of the 120% on the y bar and have it start from 0%, and

  3. get the bar to display correct proportion (currently the 52% looks the same as 37%).

Below is my MWE, thanks a lot.



My MWE is



begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
nodes near coords,
enlargelimits=0.5,
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture









share|improve this question









New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Hi, welcomme. Your code is not compileable.

    – AndréC
    8 hours ago

















3















I'm new to LaTeX and am struggling with a problem that I cannot fix.



How do I:



  1. get ride of all the number inside the bar,

  2. get rid of the 120% on the y bar and have it start from 0%, and

  3. get the bar to display correct proportion (currently the 52% looks the same as 37%).

Below is my MWE, thanks a lot.



My MWE is



begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
nodes near coords,
enlargelimits=0.5,
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture









share|improve this question









New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Hi, welcomme. Your code is not compileable.

    – AndréC
    8 hours ago













3












3








3








I'm new to LaTeX and am struggling with a problem that I cannot fix.



How do I:



  1. get ride of all the number inside the bar,

  2. get rid of the 120% on the y bar and have it start from 0%, and

  3. get the bar to display correct proportion (currently the 52% looks the same as 37%).

Below is my MWE, thanks a lot.



My MWE is



begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
nodes near coords,
enlargelimits=0.5,
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture









share|improve this question









New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I'm new to LaTeX and am struggling with a problem that I cannot fix.



How do I:



  1. get ride of all the number inside the bar,

  2. get rid of the 120% on the y bar and have it start from 0%, and

  3. get the bar to display correct proportion (currently the 52% looks the same as 37%).

Below is my MWE, thanks a lot.



My MWE is



begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
nodes near coords,
enlargelimits=0.5,
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture






pgfplots floats bar-chart






share|improve this question









New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 8 hours ago









Stefan Pinnow

21k9 gold badges36 silver badges80 bronze badges




21k9 gold badges36 silver badges80 bronze badges






New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 8 hours ago









teadrinker64teadrinker64

182 bronze badges




182 bronze badges




New contributor



teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




teadrinker64 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • Hi, welcomme. Your code is not compileable.

    – AndréC
    8 hours ago

















  • Hi, welcomme. Your code is not compileable.

    – AndréC
    8 hours ago
















Hi, welcomme. Your code is not compileable.

– AndréC
8 hours ago





Hi, welcomme. Your code is not compileable.

– AndréC
8 hours ago










1 Answer
1






active

oldest

votes


















4














You have added those numbers with the nodes near coords options. The purpose of that option is precisely to add things like the y-values above plot points/bars.



The other part is mostly a matter of setting the axis limits. You need ymin=0 to make the y-axis start at zero, and change enlargelimits to enlarge x limits so the axis limits are extended only in the x-direction.



documentclassarticle

usepackagepgfplots

begindocument
begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
% nodes near coords, % removed
ymin=0, % added
enlarge x limits=0.5, % modified
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Great, thanks very much! You saved my whole afternoon trying to figure it out!

    – teadrinker64
    8 hours ago













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
);



);






teadrinker64 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f502148%2ftikzpicture-doesnt-display-correctly%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









4














You have added those numbers with the nodes near coords options. The purpose of that option is precisely to add things like the y-values above plot points/bars.



The other part is mostly a matter of setting the axis limits. You need ymin=0 to make the y-axis start at zero, and change enlargelimits to enlarge x limits so the axis limits are extended only in the x-direction.



documentclassarticle

usepackagepgfplots

begindocument
begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
% nodes near coords, % removed
ymin=0, % added
enlarge x limits=0.5, % modified
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Great, thanks very much! You saved my whole afternoon trying to figure it out!

    – teadrinker64
    8 hours ago















4














You have added those numbers with the nodes near coords options. The purpose of that option is precisely to add things like the y-values above plot points/bars.



The other part is mostly a matter of setting the axis limits. You need ymin=0 to make the y-axis start at zero, and change enlargelimits to enlarge x limits so the axis limits are extended only in the x-direction.



documentclassarticle

usepackagepgfplots

begindocument
begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
% nodes near coords, % removed
ymin=0, % added
enlarge x limits=0.5, % modified
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture
enddocument





share|improve this answer

























  • Great, thanks very much! You saved my whole afternoon trying to figure it out!

    – teadrinker64
    8 hours ago













4












4








4







You have added those numbers with the nodes near coords options. The purpose of that option is precisely to add things like the y-values above plot points/bars.



The other part is mostly a matter of setting the axis limits. You need ymin=0 to make the y-axis start at zero, and change enlargelimits to enlarge x limits so the axis limits are extended only in the x-direction.



documentclassarticle

usepackagepgfplots

begindocument
begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
% nodes near coords, % removed
ymin=0, % added
enlarge x limits=0.5, % modified
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture
enddocument





share|improve this answer













You have added those numbers with the nodes near coords options. The purpose of that option is precisely to add things like the y-values above plot points/bars.



The other part is mostly a matter of setting the axis limits. You need ymin=0 to make the y-axis start at zero, and change enlargelimits to enlarge x limits so the axis limits are extended only in the x-direction.



documentclassarticle

usepackagepgfplots

begindocument
begintikzpicture
beginaxis[
ybar stacked,
bar width=47pt,
% nodes near coords, % removed
ymin=0, % added
enlarge x limits=0.5, % modified
legend style=at=(1.2, 0.5),
anchor=west,legend columns=1.7,
symbolic x coords=A, B,
xtick=data,
x tick label style=anchor=north,
yticklabel=pgfmathparsetick*100pgfmathprintnumberpgfmathresult%,
]

addplot+[ybar] plot coordinates (A,0.52) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.37) (B,0.45) ;
addplot+[ybar] plot coordinates (A,0.11) (B,0.1) ;
legendstrut Teritary degree, strut High school diploma, strut Less than high school
endaxis
endtikzpicture
enddocument






share|improve this answer












share|improve this answer



share|improve this answer










answered 8 hours ago









Torbjørn T.Torbjørn T.

163k13 gold badges267 silver badges453 bronze badges




163k13 gold badges267 silver badges453 bronze badges















  • Great, thanks very much! You saved my whole afternoon trying to figure it out!

    – teadrinker64
    8 hours ago

















  • Great, thanks very much! You saved my whole afternoon trying to figure it out!

    – teadrinker64
    8 hours ago
















Great, thanks very much! You saved my whole afternoon trying to figure it out!

– teadrinker64
8 hours ago





Great, thanks very much! You saved my whole afternoon trying to figure it out!

– teadrinker64
8 hours ago










teadrinker64 is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















teadrinker64 is a new contributor. Be nice, and check out our Code of Conduct.












teadrinker64 is a new contributor. Be nice, and check out our Code of Conduct.











teadrinker64 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.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f502148%2ftikzpicture-doesnt-display-correctly%23new-answer', 'question_page');

);

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







Popular posts from this blog

Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

Ласкавець круглолистий Зміст Опис | Поширення | Галерея | Примітки | Посилання | Навігаційне меню58171138361-22960890446Bupleurum rotundifoliumEuro+Med PlantbasePlants of the World Online — Kew ScienceGermplasm Resources Information Network (GRIN)Ласкавецькн. VI : Літери Ком — Левиправивши або дописавши її