![]() ![]() field ( 'legend_location', 'enabled' ))) inputs = Ports () outputs = Ports () def adjust_parameters ( self, node_context ): adjust ( node_context. field ( 'join_legends', 'checked' ), action = synode. set_boolean ( 'auto_rescale', value = True, label = 'Auto rescale axes', description = 'Automatically rescale all axes to fit the visible data.' ) controllers = ( synode. set_boolean ( 'auto_recolor', value = False, label = 'Auto recolor', description = 'Automatically recolor all artists to avoid using a color ' 'multiple times, if possible.' ) parameters. set_boolean ( 'join_colorbars', value = False, label = 'Make first colorbar global', description = 'If checked, the colorbar from the first figure becomes ' 'a global colorbar in the output figure.' ) parameters. OUTSIDE_LEGEND_LOC, description = 'Defines the position of the joined legend.', editor = synode. set_list ( 'legend_location', value =, label = 'Legend position:', plist = list ( mpl_utils. set_boolean ( 'join_legends', value = True, label = 'Join legends', description = 'Set if legends from different axes should be ' 'joined into one legend.' ) parameters. set_list ( 'parent_figure', label = 'Parent figure:', description = 'Specify the figure from which axes parameters ' 'and legend position are copied.', editor = synode. """ author = 'Benedikt Ziegler' version = '0.3' icon = 'figurecompressor.svg' name = 'Figure Compressor' description = 'Compress a list of Figures to a single Figure' nodeid = '.figurecompressorgui' tags = Tags ( Tag. ![]() Node ): """ Compress a list of Figures into one Figure. import numpy as np from sympathy import api from sympathy.api import node as synode from sympathy.api import qt2 as qt_compat from sympathy.api import node_helper from import Port, Ports, Tag, Tags, adjust from sympathy.utils import preview from sylib.figure import drawing, gui, mpl_utils QtCore = qt_compat. # You should have received a copy of the GNU General Public License # along with Sympathy for Data. See the # GNU General Public License for more details. ![]() # Sympathy for Data is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ![]() # Copyright (c) 2016-2017, Combine Control Systems AB # Sympathy for Data is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. I have successfully imported the data with the package datatool, and I am able to have it written as text on my diagram with the custom-defined command \flowvar that fetches the required data, but I don't manage to use it to modify graphical parameters.# This file is part of Sympathy for Data. I have saved this data as a text file, with a column containing the name of the data point, a second column corresponding to the actual text I would like to be displayed, and a third column with the parameter I would like to use in a file called flows.txt: Z2A, 2$\pm$0, 0.5 Here the example is for line widths, but I would like to use the same principle also for node sizes. I would like to automatically adapt the features of a flow diagram depending on my data. ![]()
0 Comments
Leave a Reply. |