diff --git a/python/paddle/utils/plot.py b/python/paddle/utils/plot.py index c18e63dd5f60481ba804738a6a9238dfea35d9f3..a2949045f80744ecf3f2825adeb1d3f1eaf6ea32 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