删除pyplot.hist()

时间:2018-11-29 23:14:05

标签: python histogram

如何删除此matplotlib直方图示例上的背景线?

Link to matplotlib tutorial

1 个答案:

答案 0 :(得分:0)

只需将示例代码中的import isEmpty from "lodash/isEmpty"; import React from "react"; import PropTypes from "prop-types"; const Logger = ({ log, title }) => !isEmpty(log) ? ( // if the log isn't empty... <div className="logger-container"> // show log <h1 style={{ textAlign: "center " }}>{title}</h1> <div className="log"> <pre> <code>{JSON.stringify(log, null, 4)}</code> </pre> </div> </div> ) : null; // else show nothing export default Logger; Logger.propTypes = { log: PropTypes.oneOfType([ PropTypes.objectOf(PropTypes.string), PropTypes.arrayOf(PropTypes.string), PropTypes.objectOf(PropTypes.objectOf(PropTypes.string)) ]), title: PropTypes.string.isRequired }; 更改为plt.grid(True)