Skip to content
Snippets Groups Projects
Commit efc8d667 authored by Richter, Manuela's avatar Richter, Manuela
Browse files

IDs werden den richtigen Figures zugeordnet

parent adfd9d96
No related branches found
No related tags found
1 merge request!12v.0.1 for alpha release
Image diff could not be displayed: it is too large. Options to address this: view the blob.
Image diff could not be displayed: it is too large. Options to address this: view the blob.
......@@ -13,6 +13,7 @@ import sys
import numpy as np
from numpy import random
import h5py as h5
import matplotlib
import matplotlib.pyplot as plt
plt.style.use('fcn_help/FST.mplstyle')
%matplotlib qt
......@@ -47,13 +48,14 @@ color2 = colors.get_rgb('yellow')
fig1 = plt.figure()
plt.plot(x,y, color=color1)
plt.plot(x,y_2, color= color2)
plt.draw()
#plt.draw()
# 2.Figure
plt.clf #Figure schließen
fig2 = plt.figure()
plt.plot(x,y, color=color2)
plt.plot(x,y_2, color= color1)
plt.draw()
#plt.draw()
plt.clf #Figure schließen
fig = [fig1, fig2]
......@@ -61,6 +63,8 @@ fig = [fig1, fig2]
[figs, ID] = TagPlot(fig, ProjectID)
plt.draw()
#figs.show()
# numbers = plt.get_fignums()
......
......@@ -4,6 +4,7 @@ Created on Tue Jul 27 10:50:20 2021
@author: Richter
"""
import matplotlib
import matplotlib.pyplot as plt
plt.style.use('fcn_help/FST.mplstyle')
#%matplotlib qt
......@@ -25,20 +26,29 @@ def TagPlot(figs,prefix):
for i in range(len(figs)):
print(i)
#%% ID erzeugen
ID = prefix + '_' +'Test'
ID = prefix + '_' +'Test'+str(i)
print(ID)
fig =figs[i]
#plt.figure(i+1)
plt.figure(fig.number)
print(fig)
test = fig.get_axes()
print(test)
x_lim = plt.xlim()
y_lim = plt.ylim()
y_mitte = 0.4*(y_lim[1]+y_lim[0])
plt.text(x_lim[1], y_mitte, ID, ha='left', rotation=90, wrap=True)
plt.draw()
#%% Figure um Graphen erweitern
x = np.linspace(0,10,100)
y_2 = np.cos(x) +2
colors = Colors()
plt.plot(x,y_2, color= colors.get_rgb('blue'))
#%% Figure um Beschriftung x-Achse erweitern
plt.xlabel('x-Achse')
# #%% Figure um Graphen erweitern
# x = np.linspace(0,10,100)
# y_2 = np.cos(x) +2
# colors = Colors()
# plt.plot(x,y_2, color= colors.get_rgb('blue'))
# #%% Figure um Beschriftung x-Achse erweitern
# plt.xlabel('x-Achse')
#%% Textfeld mit ID anlegen
# Position bestimmen
......@@ -46,13 +56,11 @@ def TagPlot(figs,prefix):
# Limits for relative Positioning
# plt.text(10, 10, ID)
#x_lim = figs.axes.get_xlim()
x_lim = plt.xlim()
y_lim = plt.ylim()
y_mitte = 0.4*(y_lim[1]+y_lim[0])
#print(x_lim)
#y_lim =
plt.text(x_lim[1], y_mitte, ID, ha='left', rotation=90, wrap=True)
plt.draw()
#plt.text(x_lim[1], y_mitte, ID, ha='left', rotation=90, wrap=True)
#plt.draw()
# Titel über get Funktion anpassen
# figs ist ein Objekt einer bestimmten Klasse
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment