From 00b11c272818193f774c43c682d52830daea71ef Mon Sep 17 00:00:00 2001 From: shippingwang Date: Mon, 8 Oct 2018 12:42:24 +0000 Subject: [PATCH] Add comment --- python/paddle/utils/plot.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/python/paddle/utils/plot.py b/python/paddle/utils/plot.py index c18e63dd5f..a2949045f8 100644 --- a/python/paddle/utils/plot.py +++ b/python/paddle/utils/plot.py @@ -11,7 +11,11 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +''' Plot data + plot data as a curve figure + feed data by using append function + draw the figure by using plot function +''' import os @@ -50,6 +54,11 @@ class Ploter(object): return self.__disable_plot__ == "True" def append(self, title, step, value): + '''Feed data + :param title: the title of the figure + :param step: x_axis + :param value: y_axis + ''' assert isinstance(title, basestring) assert self.__plot_data__.has_key(title) data = self.__plot_data__[title] @@ -57,6 +66,9 @@ class Ploter(object): data.append(step, value) def plot(self, path=None): + '''Plot data + :param path: save figure path + ''' if self.__plot_is_disabled__(): return -- GitLab