Muestra las diferencias entre dos versiones de la página.
Ambos lados, revisión anterior Revisión previa | |||
clase:asir:fhw:1eval:tema05 [2022/01/11 14:45] admin [Bus expasión] |
clase:asir:fhw:1eval:tema05 [2022/01/17 15:39] (actual) admin [Bus expasión] |
||
---|---|---|---|
Línea 68: | Línea 68: | ||
import matplotlib.pyplot as plt | import matplotlib.pyplot as plt | ||
from matplotlib.ticker import AutoMinorLocator | from matplotlib.ticker import AutoMinorLocator | ||
- | | + | |
figure=plt.figure(figsize=(16, | figure=plt.figure(figsize=(16, | ||
axes = figure.add_subplot() | axes = figure.add_subplot() | ||
- | + | | |
x=[2003, | x=[2003, | ||
y=[4, | y=[4, | ||
labels=[" | labels=[" | ||
+ | |||
axes.fill_between(x, | axes.fill_between(x, | ||
axes.plot(x, | axes.plot(x, | ||
axes.scatter(x, | axes.scatter(x, | ||
- | + | ||
+ | |||
axes.xaxis.set_ticks(range(2002, | axes.xaxis.set_ticks(range(2002, | ||
axes.yaxis.set_ticks(range(0, | axes.yaxis.set_ticks(range(0, | ||
- | + | ||
+ | |||
axes.xaxis.set_minor_locator(AutoMinorLocator(2)) | axes.xaxis.set_minor_locator(AutoMinorLocator(2)) | ||
axes.yaxis.set_minor_locator(AutoMinorLocator(2)) | axes.yaxis.set_minor_locator(AutoMinorLocator(2)) | ||
+ | |||
axes.set_facecolor("# | axes.set_facecolor("# | ||
axes.grid(visible=True, | axes.grid(visible=True, | ||
axes.grid(visible=True, | axes.grid(visible=True, | ||
+ | |||
axes.tick_params(axis=' | axes.tick_params(axis=' | ||
axes.tick_params(axis=' | axes.tick_params(axis=' | ||
axes.tick_params(axis=' | axes.tick_params(axis=' | ||
axes.tick_params(axis=' | axes.tick_params(axis=' | ||
- | + | ||
+ | axes.set_xlim(xmin=2001) | ||
axes.set_xlabel(' | axes.set_xlabel(' | ||
axes.set_ylabel(' | axes.set_ylabel(' | ||
axes.set_title(" | axes.set_title(" | ||
+ | |||
for index,label in enumerate(labels): | for index,label in enumerate(labels): | ||
axes.annotate(label, | axes.annotate(label, |