while changed: changed = False for edge in edges: source = edge.node_source dest = edge.node_dest if source in connected and dest not in connected: current.append(dest) changed = True if dest in connected and source not in connected: current.append(source) changed = True current = indirect connected.extend(current) return direct, indirect if __name__ == '__main__': import sys app = QApplication(sys.argv) app.setAttribute(Qt.AA_UseHighDpiPixmaps) from glue.core.state import load dc = load('links.glu') widget = DataGraphWidget(dc) widget.show() sys.exit(app.exec_())
# This script was produced by glue and can be used to further customize a # particular plot. ### Package imports from glue.core.state import load import matplotlib import matplotlib.pyplot as plt import numpy as np plt.ion() #matplotlib.use('Agg') ### Set up data data_collection = load('make_plot.py.data') ### Set up viewer # Initialize figure fig = plt.figure() ax = fig.add_subplot(1, 1, 1, aspect='auto') ### Set up layers ## Layer 1: coelho14_model_paa[HDU1] layer_data = data_collection[0] # Get main data values x = layer_data['mag_paa_m_high'] y = layer_data['mag_paa_m_low']
# This script was produced by glue and can be used to further customize a # particular plot. ### Package imports from glue.core.state import load import matplotlib.pyplot as plt import numpy as np ### Set up data data_collection = load('Documents/GitHub/Wells_by_County_Histogram.py.data') ### Set up viewer fig = plt.figure() ax = fig.add_subplot(1, 1, 1, aspect='auto') ### Set up layers ## Layer 1: fracfocus_registry_texas layer_data = data_collection[0] # Get main data values x = layer_data['col16'] # Set up histogram bins hist_n_bin = 30 hist_x_min = np.nanmin(x) hist_x_max = 52.5