Skip to content
Snippets Groups Projects
Select Git revision
  • 55f0274d1a4f77b316a91779df4cf908aa153ab6
  • main default protected
  • gitkeep
  • dev protected
  • Issue/2914-trellisMigrator
  • Issue/2847-reporting
  • Hotfix/2776-workingNewVersion
  • Hotfix/xxxx-correctAssignments
  • Issue/2666-adminCronjobs-theSequal
  • Issue/2666-adminCronjobs
  • Issue/2518-docs
  • Hotfix/xxxx-coscineGraph
  • Issue/2304-virtuosoRoars
  • Fix/v0.1.7-dependencies
  • Hotfix/2212-fixFiles
  • Issue/2222-resourceDateCreated
  • Issue/2221-projectDateCreated
  • Hotfix/xxxx-changeUrls
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1782-structualDataIntegration
  • Issue/2084-migrateResourceStructuralData
  • v0.1.24
  • v0.1.23
  • v0.1.22
  • v0.1.21
  • v0.1.20
  • v0.1.19
  • v0.1.18
  • v0.1.17
  • v0.1.16
  • v0.1.15
  • v0.1.14
  • v0.1.13
  • v0.1.12
  • v0.1.11
  • v0.1.10
  • v0.1.9
  • v0.1.7
  • v0.1.8
  • v0.1.6
  • v0.1.5
41 results

ProjectStructuralData.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    example.py 1.50 KiB
    # -*- coding: utf-8 -*-
    """
    Created on Tue Jul 20 12:22:33 2021
    example workflow for integrating plotIDs
    @author: Richter
    """
    
    # %% Module einbinden
    import sys
    import numpy as np
    from numpy import random
    # import h5py as h5
    # import matplotlib
    import matplotlib.pyplot as plt
    from TagPlot import TagPlot
    from publish import publish
    from fcn_help.FST_colors import Colors
    plt.style.use('fcn_help/FST.mplstyle')
    # %matplotlib qt
    # %matplotlib inline
    # %% Pfade hinzufügen
    sys.path.append("fcn_core")
    sys.path.append("fcn_help")
    
    
    # %% Project ID
    ProjectID = "MR04"
    
    # %% Plot engine
    plot_engine = "matplotlib"
    
    # %% Create sample data
    x = np.linspace(0, 10, 100)
    y = random.rand(100) + 2
    y_2 = np.sin(x) + 2
    
    # %% Create figure
    # Colors
    colors = Colors()  # create instance from class
    color_list = colors.get_color_names()
    # Create plot
    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)
    
    # 2.Figure
    plt.clf  # Close figure
    fig2 = plt.figure()
    plt.plot(x, y, color=color2)
    plt.plot(x, y_2, color=color1)
    plt.clf  # Close figure
    
    fig = [fig1, fig2]
    
    
    # %% TagPlot
    [figs, ID] = TagPlot(fig, ProjectID, plot_engine, method='2', location='west')
    
    # %% Figure als tiff-Datei abspeichern
    for i, figure in enumerate(figs):
        name = "Test"+str(i)+".tiff"
        figure.savefig(name)
    
    # %% Publish
    publish('fcn_help', '/home/chief/Dokumente/fst/plotid_python/data',
            '/home/chief/Dokumente/fst/plotid_python/Test1.tiff', 'individual')