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
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?
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
add a comment |
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?
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
How about taking the logarithm?
– marmot
12 secs ago
add a comment |
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?
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
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?
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
tables pgfplots plot graphs best-practices
asked 2 mins ago
tjt263tjt263
2758
2758
How about taking the logarithm?
– marmot
12 secs ago
add a comment |
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
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%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
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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%2f483988%2feffective-way-to-plot-values-with-a-vast-difference-between-them%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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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
How about taking the logarithm?
– marmot
12 secs ago