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

added CreateID, implemented unixtime-method

parent afe5d2e3
Branches
Tags
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.
...@@ -57,8 +57,8 @@ plt.plot(x,y_2, color= color1) ...@@ -57,8 +57,8 @@ plt.plot(x,y_2, color= color1)
#plt.draw() #plt.draw()
plt.clf #Figure schließen plt.clf #Figure schließen
#fig = [fig1, fig2] fig = [fig1, fig2]
fig = []
#%% TagPlot #%% TagPlot
[figs, ID] = TagPlot(fig, ProjectID) [figs, ID] = TagPlot(fig, ProjectID)
......
...@@ -4,6 +4,12 @@ Created on Tue Jul 27 17:02:27 2021 ...@@ -4,6 +4,12 @@ Created on Tue Jul 27 17:02:27 2021
CreateID CreateID
@author: Richter @author: Richter
""" """
#%% Module importieren
import time
#%% Funktion
def CreateID(): def CreateID():
""" """
...@@ -16,6 +22,9 @@ def CreateID(): ...@@ -16,6 +22,9 @@ def CreateID():
None. None.
""" """
ID = time.time() # UNIX Time
ID = hex(int(ID)) # Hexadezimalzahl
time.sleep(0.5) # Pause
return ID
...@@ -11,6 +11,7 @@ plt.style.use('fcn_help/FST.mplstyle') ...@@ -11,6 +11,7 @@ plt.style.use('fcn_help/FST.mplstyle')
#%matplotlib inline #%matplotlib inline
import numpy as np import numpy as np
from FST_colors import Colors from FST_colors import Colors
import CreateID
def TagPlot(figs,prefix): def TagPlot(figs,prefix):
...@@ -37,7 +38,10 @@ def TagPlot(figs,prefix): ...@@ -37,7 +38,10 @@ def TagPlot(figs,prefix):
for i in range(len(figs)): for i in range(len(figs)):
print(i) print(i)
ID = prefix + '_' +'Test'+str(i) #CreateID aufrufen
ID = CreateID.CreateID()
#ID = prefix + '_' +'Test'+str(i)
ID = prefix + '_' + str(ID)
print(ID) print(ID)
fig =figs[i] fig =figs[i]
plt.figure(fig.number) plt.figure(fig.number)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment