File:Super95price daily germany2014.svg

Original file(SVG file, nominally 420 × 320 pixels, file size: 50 KB)

Captions

Captions

Add a one-line explanation of what this file represents

Summary edit

Description
English: Plot of deviations in percent from the average daily price for super 95 gasoline in Germany from November 2014 to June 2015. Data source: Markttransparenzstelle für Kraftstoffe
Date
Source Own work
Created with Matplotlib-logo 
This plot was created with Matplotlib.
Author Geek3
Other versions

Source Code edit

The plot was generated with Matplotlib


Python Matplotlib source code
#!/usr/bin/python
# -*- coding: utf8 -*-

import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
import string

fname = 'super95price_daily_germany2014'

# deviations in percent from the average daily price for super 95 gasoline
# in Germany Nov2014 - Jun2015
# all values are spaced by 5 minutes starting at 0:00 in the morning
# source: Markttransparenzstelle für Kraftstoffe
super95_pricedev_perc_day_5m = [
2.752, 2.760, 2.764, 2.767, 2.767, 2.769,
2.771, 2.771, 2.770, 2.772, 2.773, 2.776,
2.780, 2.783, 2.787, 2.789, 2.795, 2.795,
2.801, 2.801, 2.804, 2.806, 2.807, 2.808,
2.809, 2.812, 2.813, 2.814, 2.815, 2.816,
2.816, 2.816, 2.817, 2.817, 2.817, 2.817,
2.818, 2.830, 2.832, 2.834, 2.835, 2.836,
2.837, 2.836, 2.835, 2.835, 2.834, 2.836,
2.837, 2.835, 2.841, 2.837, 2.831, 2.827,
2.824, 2.824, 2.823, 2.823, 2.824, 2.817,
2.816, 2.750, 2.704, 2.687, 2.663, 2.549,
2.422, 2.339, 2.299, 2.276, 2.251, 2.234,
2.206, 2.186, 2.169, 2.151, 2.111, 2.034,
1.959, 1.908, 1.853, 1.806, 1.759, 1.719,
1.680, 1.651, 1.611, 1.571, 1.521, 1.463,
1.408, 1.370, 1.325, 1.284, 1.245, 1.204,
1.162, 1.133, 1.088, 1.042, 0.994, 0.935,
0.878, 0.832, 0.778, 0.730, 0.682, 0.632,
0.588, 0.544, 0.493, 0.445, 0.391, 0.341,
0.287, 0.246, 0.192, 0.135, 0.083, 0.042,
-0.007, -0.048, -0.100, -0.147, -0.195, -0.248,
-0.295, -0.335, -0.382, -0.422, -0.468, -0.506,
-0.547, -0.578, -0.627, -0.684, -0.730, -0.780,
-0.825, -0.863, -0.911, -0.951, -0.994, -1.036,
-1.077, -1.118, -1.166, -1.211, -1.255, -1.301,
-1.345, -1.390, -1.433, -1.469, -1.506, -1.541,
-1.577, -1.607, -1.643, -1.682, -1.717, -1.746,
-1.779, -1.804, -1.839, -1.870, -1.900, -1.925,
-1.959, -1.981, -2.015, -2.051, -2.090, -2.117,
-2.145, -2.172, -2.200, -2.226, -2.252, -2.276,
-2.297, -2.325, -2.347, -2.375, -2.402, -2.430,
-2.459, -2.477, -2.500, -2.528, -2.553, -2.568,
-2.593, -2.611, -2.635, -2.657, -2.678, -2.704,
-2.728, -2.745, -2.769, -2.788, -2.810, -2.824,
-2.845, -2.862, -2.880, -2.900, -2.921, -2.934,
-2.951, -2.968, -2.985, -2.998, -3.010, -3.024,
-3.042, -3.051, -3.066, -3.077, -3.094, -3.104,
-3.116, -3.124, -3.134, -3.145, -3.151, -3.158,
-3.164, -3.094, -3.084, -3.092, -3.097, -3.099,
-3.104, -3.111, -3.117, -3.119, -3.121, -3.121,
-3.121, -2.458, -2.265, -2.249, -2.240, -2.229,
-2.226, -2.196, -2.176, -2.163, -2.155, -2.153,
-2.145, -1.705, -1.226, -1.195, -1.194, -1.184,
-1.179, -1.167, -1.160, -1.153, -1.147, -1.139,
-0.720, 0.215, 0.515, 0.622, 0.673, 0.713,
0.733, 0.748, 0.760, 0.777, 0.881, 0.904,
1.070, 1.701, 2.142, 2.316, 2.573, 2.624,
2.664, 2.694, 2.725, 2.735, 2.740, 2.746
]

plt.close('all')
fig = plt.figure(figsize=(421/72., 321/72.))
ax = fig.gca()
plt.xlim(0, 24)
plt.ylim(-3.5, 3.5)
plt.title('Super 95 Benzin')
plt.xlabel('Uhrzeit')
plt.ylabel('relative Preisabweichung')
plt.grid(True, linestyle='-', linewidth=0.4)
plt.grid(True, which='minor')

ax.xaxis.set_major_locator(mpl.ticker.MultipleLocator(6))
ax.xaxis.set_major_formatter(mpl.ticker.FormatStrFormatter('%d:00'))
ax.yaxis.set_major_formatter(mpl.ticker.FormatStrFormatter('%+d %%'))
minorxticks = filter(lambda x: x/6.!=int(x/6.), np.arange(0, 24, 1))
ax.set_xticks(minorxticks, minor=True)

fig.canvas.draw()
for l in ax.yaxis.get_gridlines():
    if l.get_ydata()[0] == 0.0:
        l.set_linewidth(1)

plt.plot(np.arange(0, 24, 1.0/12), super95_pricedev_perc_day_5m, '-', lw=2.4)

plt.tight_layout()
plt.savefig(fname + '.svg')
f = open(fname + '.svg', 'r')
txt = string.replace(f.read(), 'pt', 'px', 2)
f.close()
f = open(fname + '.svg', 'w')
f.write(txt)
f.close()

Licensing edit

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.
w:en:Creative Commons
attribution share alike
This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported, 2.5 Generic, 2.0 Generic and 1.0 Generic license.
You are free:
  • to share – to copy, distribute and transmit the work
  • to remix – to adapt the work
Under the following conditions:
  • attribution – You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
  • share alike – If you remix, transform, or build upon the material, you must distribute your contributions under the same or compatible license as the original.
You may select the license of your choice.

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current20:07, 13 September 2015Thumbnail for version as of 20:07, 13 September 2015420 × 320 (50 KB)Geek3 (talk | contribs){{Information |Description ={{en|1=Plot of deviations in percent from the average daily price for super 95 gasoline in Germany from November 2014 to June 2015. Data source: Markttransparenzstelle für Kraftstoffe}} |Source ={{own}}</br>{{Cre...

The following page uses this file:

Metadata