Method: Charty::Backends::Pyplot#save
- Defined in:
- lib/charty/backends/pyplot.rb
#save(filename, format: nil, title: nil, width: 700, height: 500, **kwargs) ⇒ Object
754 755 756 757 758 759 760 761 762 |
# File 'lib/charty/backends/pyplot.rb', line 754 def save(filename, format: nil, title: nil, width: 700, height: 500, **kwargs) params = {} params[:format] = format unless format.nil? SAVEFIG_OPTIONAL_PARAMS.each do |key| params[key] = kwargs[key] if kwargs.key?(key) end @pyplot.savefig(filename, **params) @pyplot.close end |