@@ -67,7 +67,7 @@ def get_bounds(self):
6767 return bounds
6868
6969 def add_children (self , child , name = None , index = None ):
70- """Add a children ."""
70+ """Add a child ."""
7171 if name is None :
7272 name = child .get_name ()
7373 if index is None :
@@ -107,9 +107,7 @@ def get_root(self):
107107 return self ._parent .get_root ()
108108
109109 def render (self , ** kwargs ):
110- """Renders the Element into an HTML representation, using the `_template`
111- attribute.
112- """
110+ """Renders the HTML representation of the element."""
113111 return self ._template .render (this = self , kwargs = kwargs )
114112
115113 def save (self , outfile , close_file = True , ** kwargs ):
@@ -327,7 +325,7 @@ def get_root(self):
327325 return self
328326
329327 def render (self , ** kwargs ):
330- """Renders the Element into an HTML representation ."""
328+ """Renders the HTML representation of the element ."""
331329 for name , child in self ._children .items ():
332330 child .render (** kwargs )
333331 return self ._template .render (this = self , kwargs = kwargs )
@@ -380,8 +378,7 @@ def add_subplot(self, x, y, n, margin=0.05):
380378
381379
382380class Html (Element ):
383- """A basic Element for embedding HTML.
384- """
381+ """A basic Element for embedding HTML."""
385382 def __init__ (self , data , width = "100%" , height = "100%" ):
386383 """Create an HTML div object for embedding data.
387384
@@ -390,11 +387,11 @@ def __init__(self, data, width="100%", height="100%"):
390387 data : str
391388 The HTML data to be embedded.
392389 width : int or str, default '100%'
393- The width of the output div.
394- Ex : 120 , '120px', '80%'
390+ The width of the output div element .
391+ Ex: 120 , '120px', '80%'
395392 height : int or str, default '100%'
396- The height of the output div.
397- Ex : 120 , '120px', '80%'
393+ The height of the output div element .
394+ Ex: 120 , '120px', '80%'
398395 """
399396 super (Html , self ).__init__ ()
400397 self ._name = 'Html'
@@ -457,7 +454,7 @@ def get_root(self):
457454 return self
458455
459456 def render (self , ** kwargs ):
460- """Renders the Element into an HTML representation ."""
457+ """Renders the HTML representation of the element ."""
461458 figure = self ._parent
462459 assert isinstance (figure , Figure ), ("You cannot render this Element "
463460 "if it's not in a Figure." )
@@ -537,12 +534,7 @@ def __init__(self, html=None, width="100%", height=None, ratio="60%",
537534 self .add_children (html )
538535
539536 def render (self , ** kwargs ):
540- """Displays the Figure in a Jupyter notebook.
541-
542- Parameters
543- ----------
544-
545- """
537+ """Renders the HTML representation of the element."""
546538 html = super (IFrame , self ).render (** kwargs )
547539 html = "data:text/html;base64," + base64 .b64encode (html .encode ('utf8' )).decode ('utf8' ) # noqa
548540
@@ -589,7 +581,7 @@ def __init__(self):
589581 self ._template = Template (u"" )
590582
591583 def render (self , ** kwargs ):
592- """Renders the Element into an HTML representation ."""
584+ """Renders the HTML representation of the element ."""
593585 figure = self .get_root ()
594586 assert isinstance (figure , Figure ), ("You cannot render this Element "
595587 "if it's not in a Figure." )
0 commit comments