pgfplots: How to set xticklabel as two line? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)plotting two time series with boundsHow do i get the x axis on top but keep a line on the bottomHow 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 graphpgfplots: percentage in matrix plotOverlay xticklabel and yticklabel in pgfplotsEndogenous ticks in pgfplots created by data generating processHow can I remove 10^(−n) notation for values less than 1 in pgfplots?xticklabel distance for math expression

One-one communication

How do I find my Spellcasting Ability for my D&D character?

How to achieve cat-like agility?

How do Java 8 default methods hеlp with lambdas?

The Nth Gryphon Number

Understanding piped commands in GNU/Linux

Why can't fire hurt Daenerys but it did to Jon Snow in season 1?

Does the universe have a fixed centre of mass?

How can I prevent/balance waiting and turtling as a response to cooldown mechanics

Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?

Fit odd number of triplets in a measure?

Searching extreme points of polyhedron

What did Turing mean when saying that "machines cannot give rise to surprises" is due to a fallacy?

Marquee sign letters

draw a pulley system

Magento 2 - Add additional attributes in register

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

Is the Mordenkainen's Sword spell underpowered?

Improvising over quartal voicings

The test team as an enemy of development? And how can this be avoided?

Why do C and C++ allow the expression (int) + 4*5?

Combining list in a Cartesian product format with addition operation?

Are there any irrational/transcendental numbers for which the distribution of decimal digits is not uniform?

How do you cope with tons of web fonts when copying and pasting from web pages?



pgfplots: How to set xticklabel as two line?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)plotting two time series with boundsHow do i get the x axis on top but keep a line on the bottomHow 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 graphpgfplots: percentage in matrix plotOverlay xticklabel and yticklabel in pgfplotsEndogenous ticks in pgfplots created by data generating processHow can I remove 10^(−n) notation for values less than 1 in pgfplots?xticklabel distance for math expression










0















I want to design xticklabels as two line texts:



  • First line: Date, e.g. month/day

  • Second line: Time, e.g. hour:minute


Minimum Working Example (MWE):



documentclassstandalone
usepackagepgfplots
usepackagefilecontents
usepgfplotslibrarydateplot

beginfilecontentsdata.csv
Date; Value
2019-04-01 12:00:00; 1
2019-04-02 12:00:00; 2
2019-04-03 12:00:00; 3
2019-04-04 12:00:00; 4
2019-04-05 12:00:00; 5
endfilecontents

begindocument
begintikzpicture
beginaxis[date coordinates in = x,
xticklabel = month/day,
table/col sep = semicolon]
addplot table[x=Date,y=Value]data.csv;
endaxis
endtikzpicture%
enddocument



Screenshot of the result:



Screenshot of the result




Screenshot of the desired state:



Screenshot of the desired state




The final question is: How to do so?



It seems that



  • xticklabel = month/day \ hour:minute

as well as



  • xticklabel = month/day newline hour:minute

does not work.










share|improve this question






















  • You need align for xticklabel.

    – JouleV
    11 mins ago















0















I want to design xticklabels as two line texts:



  • First line: Date, e.g. month/day

  • Second line: Time, e.g. hour:minute


Minimum Working Example (MWE):



documentclassstandalone
usepackagepgfplots
usepackagefilecontents
usepgfplotslibrarydateplot

beginfilecontentsdata.csv
Date; Value
2019-04-01 12:00:00; 1
2019-04-02 12:00:00; 2
2019-04-03 12:00:00; 3
2019-04-04 12:00:00; 4
2019-04-05 12:00:00; 5
endfilecontents

begindocument
begintikzpicture
beginaxis[date coordinates in = x,
xticklabel = month/day,
table/col sep = semicolon]
addplot table[x=Date,y=Value]data.csv;
endaxis
endtikzpicture%
enddocument



Screenshot of the result:



Screenshot of the result




Screenshot of the desired state:



Screenshot of the desired state




The final question is: How to do so?



It seems that



  • xticklabel = month/day \ hour:minute

as well as



  • xticklabel = month/day newline hour:minute

does not work.










share|improve this question






















  • You need align for xticklabel.

    – JouleV
    11 mins ago













0












0








0








I want to design xticklabels as two line texts:



  • First line: Date, e.g. month/day

  • Second line: Time, e.g. hour:minute


Minimum Working Example (MWE):



documentclassstandalone
usepackagepgfplots
usepackagefilecontents
usepgfplotslibrarydateplot

beginfilecontentsdata.csv
Date; Value
2019-04-01 12:00:00; 1
2019-04-02 12:00:00; 2
2019-04-03 12:00:00; 3
2019-04-04 12:00:00; 4
2019-04-05 12:00:00; 5
endfilecontents

begindocument
begintikzpicture
beginaxis[date coordinates in = x,
xticklabel = month/day,
table/col sep = semicolon]
addplot table[x=Date,y=Value]data.csv;
endaxis
endtikzpicture%
enddocument



Screenshot of the result:



Screenshot of the result




Screenshot of the desired state:



Screenshot of the desired state




The final question is: How to do so?



It seems that



  • xticklabel = month/day \ hour:minute

as well as



  • xticklabel = month/day newline hour:minute

does not work.










share|improve this question














I want to design xticklabels as two line texts:



  • First line: Date, e.g. month/day

  • Second line: Time, e.g. hour:minute


Minimum Working Example (MWE):



documentclassstandalone
usepackagepgfplots
usepackagefilecontents
usepgfplotslibrarydateplot

beginfilecontentsdata.csv
Date; Value
2019-04-01 12:00:00; 1
2019-04-02 12:00:00; 2
2019-04-03 12:00:00; 3
2019-04-04 12:00:00; 4
2019-04-05 12:00:00; 5
endfilecontents

begindocument
begintikzpicture
beginaxis[date coordinates in = x,
xticklabel = month/day,
table/col sep = semicolon]
addplot table[x=Date,y=Value]data.csv;
endaxis
endtikzpicture%
enddocument



Screenshot of the result:



Screenshot of the result




Screenshot of the desired state:



Screenshot of the desired state




The final question is: How to do so?



It seems that



  • xticklabel = month/day \ hour:minute

as well as



  • xticklabel = month/day newline hour:minute

does not work.







tikz-pgf pgfplots labels axis ticks






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked 18 mins ago









DaveDave

1,292621




1,292621












  • You need align for xticklabel.

    – JouleV
    11 mins ago

















  • You need align for xticklabel.

    – JouleV
    11 mins ago
















You need align for xticklabel.

– JouleV
11 mins ago





You need align for xticklabel.

– JouleV
11 mins 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%2f486028%2fpgfplots-how-to-set-xticklabel-as-two-line%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%2f486028%2fpgfplots-how-to-set-xticklabel-as-two-line%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

Lioubotyn Sommaire Géographie | Histoire | Population | Notes et références | Liens externes | Menu de navigationlubotin.kharkov.uamodifier« Recensements et estimations de la population depuis 1897 »« Office des statistiques d'Ukraine : population au 1er janvier 2010, 2011 et 2012 »« Office des statistiques d'Ukraine : population au 1er janvier 2011, 2012 et 2013 »Informations officiellesCartes topographiquesCarte routièrem

Isabella Eugénie Boyer Biographie | Références | Menu de navigationmodifiermodifier le codeComparator to Compute the Relative Value of a U.S. Dollar Amount – 1774 to Present.

Mpande kaSenzangakhona Biographie | Références | Menu de navigationmodifierMpande kaSenzangakhonavoir la liste des auteursm