Yhteenveto
This image is ganerated with various R scripts from
data provided in WorldClim 1.4 home page.
http://www.worldclim.org/paleo-climate1 archive copy at the Wayback Machine
Data is processed with gdal-tools and r script to
produce file "parislgm.txt"
1;-6;48
2;-5;43
3;1;53
4;5;48
5;9;49
6;11;45
7;12;48
8;11;52
9;9;46
10;5;56
11;0;56
12;-4;52
This file has input to "clidiag.py"
python matplotlib script.
import matplotlib.pyplot as plt
import numpy as np
import csv
params = {'legend.fontsize': 'x-large',
'figure.figsize': (8, 12),
'axes.labelsize': 'x-large',
'axes.titlesize':'x-large',
'xtick.labelsize':'x-large',
'ytick.labelsize':'x-large'}
plt.rcParams.update(params)
x = []
y = []
y2= []
with open('parislgm.txt','r') as csvfile:
plots = csv.reader(csvfile, delimiter=';')
for row in plots:
x.append(int(row[0]))
y.append(int(row[1]))
y2.append(int(row[2]))
fig, ax1 = plt.subplots()
ax1.axis((1,12,0,100), fontsize=30)
ax1.bar(x, y2, label="Precip. mm", width=0.9, align="center")
Make the y-axis label and tick labels match the line color.
ax1.set_ylabel('Precipitation mm', color='b', fontsize=30)
for tl in ax1.get_yticklabels():
tl.set_color('b')
tl.set_fontsize(30)
ax2 = ax1.twinx()
ax2.set_ylabel('Temperature C', color='r', fontsize=30)
ax2.axis((1,12,-10,30), fontsize=30)
ax2.plot(x,y, label='Temperature C',color="red", linewidth=10)
fig = plt.figure(figsize=(10, 20))
for t2 in ax2.get_yticklabels():
t2.set_color('r')
t2.set_fontsize(30)
ax1.set_xlabel('Month', color="darkgreen", fontsize=30)
for tix in ax1.get_xticklabels():
tix.set_color("Black")
tix.set_fontsize(30)
ax1.set_title('Paris, Last Glacial Maximum', fontsize=40)
plt.show()
plt.plot()
plt.xlabel('Month', fontsize=30)
plt.ylabel('ylabel', fontsize=6)
F = plt.gcf()
DefaultSize = F.get_size_inches()
F.set_size_inches( (DefaultSize[0]/3, DefaultSize[1]/2) )
F.set_size_inches(14,18)
plt.savefig("test.svg", format="svg", dpi = (20))
Lisenssi
Minä, tämän teoksen tekijänoikeuksien haltija, julkaisen täten tämän teoksen seuraavalla lisenssillä:
Voit:
jakaa – kopioida, levittää ja esittää teosta
remiksata – valmistaa muutettuja teoksia
Seuraavilla ehdoilla:
nimeäminen – Sinun on mainittava lähde asianmukaisesti, tarjottava linkki lisenssiin sekä merkittävä, mikäli olet tehnyt muutoksia. Voit tehdä yllä olevan millä tahansa kohtuullisella tavalla, mutta et siten, että annat ymmärtää lisenssinantajan suosittelevan sinua tai teoksen käyttöäsi.
jaa samoin – Jos muutat tai perustat tähän työhön, voit jakaa tuloksena syntyvää työtä vain tällä tai tämän kaltaisella lisenssillä. https://creativecommons.org/licenses/by-sa/4.0 CC BY-SA 4.0 Creative Commons Attribution-Share Alike 4.0 true true suomi Lisää yhden rivin pituinen kuvaus tästä tiedostosta