提交 00b11c27 编写于 作者: S shippingwang

Add comment

上级 d5f79181
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册