Skip to content
Snippets Groups Projects
Select Git revision
  • v1.18.1
  • main default protected
  • Test/xxxx-shaclForm
  • dev protected
  • Issue/3240-changeMetadataUpdateButton
  • Issue/3242-UserDeletionOnProfile
  • Issue/3245-maintenanceAPIUpdate
  • Issue/3212-AddEmailforexpiredToken
  • Hotfix/xxxx-podmanComposeFix
  • Issue/3135-newUiUnitTests
  • Issue/3187-VersionStorage
  • Issue/3179-sortDataPublicationServiceList
  • Issue/3193-processingOfPersonalDataConsent
  • Hotfix/2486-ImprovedGitLabTokenHandling
  • Issue/2486-ImprovedGitLabTokenHandling
  • Issue/2511-moveResourceInfoToModalView
  • Issue/2450-AdminPage
  • Issue/3222-FairDOFeedbackChanges
  • Issue/1560-VisibilityAndOrder
  • Issue/3082-visualizeFDOs
  • Issue/3203-brokenCoscineSurfacePage
  • v3.28.0
  • v3.27.0
  • v3.26.1
  • v3.26.0
  • v3.25.0
  • v3.24.0
  • v3.23.0
  • v3.22.0
  • v3.21.0
  • v3.20.0
  • v3.19.2
  • v3.19.1
  • v3.19.0
  • v3.18.0
  • v3.17.2
  • v3.17.1
  • v3.17.0
  • v3.16.1
  • v3.16.0
  • v3.15.6
41 results

README.md

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    example.py 1.48 KiB
    # -*- coding: utf-8 -*-
    """
    Created on Tue Jul 20 12:22:33 2021
    example workflow for integrating plotIDs
    @author: Richter
    """
    #%% Code und Konsole aufräumen
    %reset
    %matplotlib
    %clear
    #%% Module einbinden
    import sys
    import numpy as np
    from numpy import random
    import h5py as h5
    import matplotlib.pyplot as plt
    plt.style.use('fcn_help/FST.mplstyle')
    %matplotlib qt  
    #%matplotlib inline
    from FST_colors import Colors
    from TagPlot import TagPlot
    #%% Pfade hinzufügen
    sys.path.append("fcn_core")
    sys.path.append("fcn_help")
                    
    
    #%% Project ID
    ProjectID= "MR01"
    
    #%% Daten erzeugen
    x = np.linspace(0,10,100)
    y= random.rand(100) + 2
    y_2 = np.sin(x) +2 
    
    #%% Daten speichern
    dataset1 = "test_data.npy"
    np.save(dataset1, x,y, y_2)
    
    #%% figure erstellen
    # Farben
    colors = Colors() # create instance from class
    color_list = colors.get_color_names()
    # Plot erstellen
    color1 = colors.get_rgb('black')
    color2 = colors.get_rgb('yellow')
    #1.Figure
    fig1 = plt.figure()
    plt.plot(x,y, color=color1)
    plt.plot(x,y_2, color= color2)
    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()
    
    fig = [fig1, fig2]
    
    #print(type(Figure1))
    
    [figs, ID] = TagPlot(fig, ProjectID)
    
    #figs.show()
    
    # numbers = plt.get_fignums()
    # labels = plt.get_figlabels()
    # print(numbers)
    # print(labels)
    
    # plt.draw()
    
    
    # plot taggen
    
    #%% Figure als tiff-Datei abspeichern
    for i in range(len(figs)):
        name = "Test"+str(i)+".tiff"
        figs[i].savefig(name)