Effective way to plot values with a vast difference between them The 2019 Stack Overflow Developer Survey Results Are In

Is it worth rebuilding a wheel myself to save money?

Unbreakable Formation vs. Cry of the Carnarium

What could be the right powersource for 15 seconds lifespan disposable giant chainsaw?

Is there a name of the flying bionic bird?

How to make payment on the internet without leaving a money trail?

Patience, young "Padovan"

Is "plugging out" electronic devices an American expression?

The difference between dialogue marks

What are the advantages and disadvantages of running one shots compared to campaigns?

Do Shazam and Man of Steel exist in same universe?

What do the Banks children have against barley water?

Where to refill my bottle in India?

Are cabin dividers used to "hide" the flex of the airplane?

Landlord wants to switch my lease to a "Land contract" to "get back at the city"

What is the motivation for a law requiring 2 parties to consent for recording a conversation

Inline version of a function returns different value then non-inline version

Deadlock Graph and Interpretation, solution to avoid

get_users(...) only returns one user

Evaluating number of iteration with a certain map with While

Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?

New order #4: World

How are circuits which use complex ICs normally simulated?

Why do UK politicians seemingly ignore opinion polls on Brexit?

Is bread bad for ducks?



Effective way to plot values with a vast difference between them



The 2019 Stack Overflow Developer Survey Results Are In










1















Here's a nice simple bar graph. It's effective when the plotted values are in the same kind of ballpark, but when there's an outlier, it can put things out of wack.



For instance, I want to plot some values where:

the lowest value is 90,000,000 (90 Million);

the second highest is 500,000,000 (500 Million);

the highest value is 3,000,000,000 (3,000 Million); †3 Billion (short scale)



First of all, the bars would slide ride off the page. Even if I shift the decimal point.



Second point is, it effects the actual figures displayed on the graph.



Third point is, most of the values are towards the low end of the scale (around 100 million), so most of the bars are very small, and there is just this one massive bar. What's the solution?



enter image description here



documentclass[margin=10, varwidth]standalone
usepackagetikz
tikzsetbarlabels/.style=font=footnotesizesffamily, declare function=barheight=5pt;

begindocument
begincenter
begintikzpicture[y=0.3cm, x=0.06cm]
foreach [count=i from 0] p/t in
10.1/Argentina,
50.0/Armenia,
300.0/Belgium,
10.2/Brazil,
10.3/Bulgaria,
9.0/Canada,
9.5/China,
11.0/Taiwan,
10.7/Czechia,
9.9/Finland
node [anchor=base east, barlabels, name=i-i] at (0,-i) t;
fill [blue!40] (i-i.base east) rectangle ++(p,barheight) ++(0,-barheight) node[barlabels, black, anchor=base west] p;
endtikzpicture
endcenter
enddocument








share






















  • How about taking the logarithm?

    – marmot
    12 secs ago















1















Here's a nice simple bar graph. It's effective when the plotted values are in the same kind of ballpark, but when there's an outlier, it can put things out of wack.



For instance, I want to plot some values where:

the lowest value is 90,000,000 (90 Million);

the second highest is 500,000,000 (500 Million);

the highest value is 3,000,000,000 (3,000 Million); †3 Billion (short scale)



First of all, the bars would slide ride off the page. Even if I shift the decimal point.



Second point is, it effects the actual figures displayed on the graph.



Third point is, most of the values are towards the low end of the scale (around 100 million), so most of the bars are very small, and there is just this one massive bar. What's the solution?



enter image description here



documentclass[margin=10, varwidth]standalone
usepackagetikz
tikzsetbarlabels/.style=font=footnotesizesffamily, declare function=barheight=5pt;

begindocument
begincenter
begintikzpicture[y=0.3cm, x=0.06cm]
foreach [count=i from 0] p/t in
10.1/Argentina,
50.0/Armenia,
300.0/Belgium,
10.2/Brazil,
10.3/Bulgaria,
9.0/Canada,
9.5/China,
11.0/Taiwan,
10.7/Czechia,
9.9/Finland
node [anchor=base east, barlabels, name=i-i] at (0,-i) t;
fill [blue!40] (i-i.base east) rectangle ++(p,barheight) ++(0,-barheight) node[barlabels, black, anchor=base west] p;
endtikzpicture
endcenter
enddocument








share






















  • How about taking the logarithm?

    – marmot
    12 secs ago













1












1








1








Here's a nice simple bar graph. It's effective when the plotted values are in the same kind of ballpark, but when there's an outlier, it can put things out of wack.



For instance, I want to plot some values where:

the lowest value is 90,000,000 (90 Million);

the second highest is 500,000,000 (500 Million);

the highest value is 3,000,000,000 (3,000 Million); †3 Billion (short scale)



First of all, the bars would slide ride off the page. Even if I shift the decimal point.



Second point is, it effects the actual figures displayed on the graph.



Third point is, most of the values are towards the low end of the scale (around 100 million), so most of the bars are very small, and there is just this one massive bar. What's the solution?



enter image description here



documentclass[margin=10, varwidth]standalone
usepackagetikz
tikzsetbarlabels/.style=font=footnotesizesffamily, declare function=barheight=5pt;

begindocument
begincenter
begintikzpicture[y=0.3cm, x=0.06cm]
foreach [count=i from 0] p/t in
10.1/Argentina,
50.0/Armenia,
300.0/Belgium,
10.2/Brazil,
10.3/Bulgaria,
9.0/Canada,
9.5/China,
11.0/Taiwan,
10.7/Czechia,
9.9/Finland
node [anchor=base east, barlabels, name=i-i] at (0,-i) t;
fill [blue!40] (i-i.base east) rectangle ++(p,barheight) ++(0,-barheight) node[barlabels, black, anchor=base west] p;
endtikzpicture
endcenter
enddocument








share














Here's a nice simple bar graph. It's effective when the plotted values are in the same kind of ballpark, but when there's an outlier, it can put things out of wack.



For instance, I want to plot some values where:

the lowest value is 90,000,000 (90 Million);

the second highest is 500,000,000 (500 Million);

the highest value is 3,000,000,000 (3,000 Million); †3 Billion (short scale)



First of all, the bars would slide ride off the page. Even if I shift the decimal point.



Second point is, it effects the actual figures displayed on the graph.



Third point is, most of the values are towards the low end of the scale (around 100 million), so most of the bars are very small, and there is just this one massive bar. What's the solution?



enter image description here



documentclass[margin=10, varwidth]standalone
usepackagetikz
tikzsetbarlabels/.style=font=footnotesizesffamily, declare function=barheight=5pt;

begindocument
begincenter
begintikzpicture[y=0.3cm, x=0.06cm]
foreach [count=i from 0] p/t in
10.1/Argentina,
50.0/Armenia,
300.0/Belgium,
10.2/Brazil,
10.3/Bulgaria,
9.0/Canada,
9.5/China,
11.0/Taiwan,
10.7/Czechia,
9.9/Finland
node [anchor=base east, barlabels, name=i-i] at (0,-i) t;
fill [blue!40] (i-i.base east) rectangle ++(p,barheight) ++(0,-barheight) node[barlabels, black, anchor=base west] p;
endtikzpicture
endcenter
enddocument






tables pgfplots plot graphs best-practices





share












share










share



share










asked 2 mins ago









tjt263tjt263

2758




2758












  • How about taking the logarithm?

    – marmot
    12 secs ago

















  • How about taking the logarithm?

    – marmot
    12 secs ago
















How about taking the logarithm?

– marmot
12 secs ago





How about taking the logarithm?

– marmot
12 secs ago










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



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f483988%2feffective-way-to-plot-values-with-a-vast-difference-between-them%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















draft saved

draft discarded
















































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%2f483988%2feffective-way-to-plot-values-with-a-vast-difference-between-them%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

How should I use the fbox command correctly to avoid producing a Bad Box message?How to put a long piece of text in a box?How to specify height and width of fboxIs there an arrayrulecolor-like command to change the rule color of fbox?What is the command to highlight bad boxes in pdf?Why does fbox sometimes place the box *over* the graphic image?how to put the text in the boxHow to create command for a box where text inside the box can automatically adjust?how can I make an fbox like command with certain color, shape and width of border?how to use fbox in align modeFbox increase the spacing between the box and it content (inner margin)how to change the box height of an equationWhat is the use of the hbox in a newcommand command?

Doxepinum Nexus interni Notae | Tabula navigationis3158DB01142WHOa682390"Structural Analysis of the Histamine H1 Receptor""Transdermal and Topical Drug Administration in the Treatment of Pain""Antidepressants as antipruritic agents: A review"

inputenc: Unicode character … not set up for use with LaTeX The Next CEO of Stack OverflowEntering Unicode characters in LaTeXHow to solve the `Package inputenc Error: Unicode char not set up for use with LaTeX` problem?solve “Unicode char is not set up for use with LaTeX” without special handling of every new interesting UTF-8 characterPackage inputenc Error: Unicode character ² (U+B2)(inputenc) not set up for use with LaTeX. acroI2C[I²C]package inputenc error unicode char (u + 190) not set up for use with latexPackage inputenc Error: Unicode char u8:′ not set up for use with LaTeX. 3′inputenc Error: Unicode char u8: not set up for use with LaTeX with G-BriefPackage Inputenc Error: Unicode char u8: not set up for use with LaTeXPackage inputenc Error: Unicode char ́ (U+301)(inputenc) not set up for use with LaTeX. includePackage inputenc Error: Unicode char ̂ (U+302)(inputenc) not set up for use with LaTeX. … $widehatleft (OA,AA' right )$Package inputenc Error: Unicode char â„¡ (U+2121)(inputenc) not set up for use with LaTeX. printbibliography[heading=bibintoc]Package inputenc Error: Unicode char − (U+2212)(inputenc) not set up for use with LaTeXPackage inputenc Error: Unicode character α (U+3B1) not set up for use with LaTeXPackage inputenc Error: Unicode characterError: ! Package inputenc Error: Unicode char ⊘ (U+2298)(inputenc) not set up for use with LaTeX