Changeset 2531 in lmdz_wrf


Ignore:
Timestamp:
May 12, 2019, 12:06:14 AM (6 years ago)
Author:
lfita
Message:

Adding:

  • `paint_filled': Function to draw an object filling given sections
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/geometry_tools.py

    r2530 r2531  
    5959# zisland1: Function to draw an island from z-axis as the union of a series of points by
    6060#   circular segments
     61
    6162## Plotting
     63# paint_filled: Function to draw an object filling given sections
    6264# plot_sphere: Function to plot an sphere and determine which standard lines will be
    6365#   also drawn
     
    15121514
    15131515    return fig, ax
     1516
     1517def paint_filled(objdic, fillsecs):
     1518    """ Function to draw an object filling given sections
     1519      objdic: dictionary of the object
     1520      filesecs: list of sections to be filled
     1521    """
     1522    fname = 'paint_filled'
     1523
     1524    Nsecs = len(fillsecs)
     1525
     1526    for secn in fillsecs:
     1527        secvals=objdic[secn]
     1528        pvals = secvals[0]
     1529        plt.fill(pvals[:,1], pvals[:,0], color=secvals[2])
     1530
     1531    return
     1532
Note: See TracChangeset for help on using the changeset viewer.