LaTeX forum ⇒ Graphics, Figures & TablesPlot with months and years as x-axis

Information and discussion about graphics, figures & tables in LaTeX documents.
Murd
Posts: 5
Joined: Wed Aug 29, 2018 3:44 pm

Plot with months and years as x-axis

Postby Murd » Fri Sep 14, 2018 10:55 am

Hey!

I'm currently trying to create a plot with pfgplots, that displays the price of fuel since 2005 to today. The data I have provides a data point for each month. My goal is to achieve a plot where every month is abbreviated to the first letter and then grouped by year (see image).

Untitled.png
Untitled.png (19.69 KiB) Viewed 260 times


Does anyone know how to achieve this? I tried different approaches, but none of them brought me even close.

Thanks!
Murd

Tags:

rais
Posts: 175
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Mon Sep 17, 2018 3:22 am

Perhaps a groupplot with the year as group's x-label and the months as x-ticks would do.

When I think about how much the price for fuel changes at some gas stations even within one day, one month seems oddly far spaced ;-)

In which form do you have the data? csv file? How does a sample entry look like?

KR
Rainer


Return to “Graphics, Figures & Tables”

Who is online

Users browsing this forum: No registered users and 3 guests