8 Random LayoutΒΆ

This example display randomly N layout from the set of all available Layout file

The file extension is .lay

  • ../_images/sphx_glr_plot_layout_001.png
  • ../_images/sphx_glr_plot_layout_002.png
  • ../_images/sphx_glr_plot_layout_003.png
  • ../_images/sphx_glr_plot_layout_004.png
  • ../_images/sphx_glr_plot_layout_005.png
  • ../_images/sphx_glr_plot_layout_006.png
  • ../_images/sphx_glr_plot_layout_007.png
from pylayers.gis.layout import Layout
import matplotlib.pyplot as plt
import random
import warnings

warnings.filterwarnings("error")
L = Layout()
lL = L.ls()
N = 8
for tL in random.sample(lL,N):
    if 'Munich' not in tL:
        L = Layout(tL,bbuild=0,bgraphs=0)
        f,a = L.showG('s')
        #plt.title(tL,fontsize=32)
        plt.show()

Total running time of the script: (0 minutes 11.951 seconds)

Download Python source code: plot_layout.py

Download IPython notebook: plot_layout.ipynb

Generated by Sphinx-Gallery