From 6b14a95c344020968eb5dbcc9249a8488c8f1545 Mon Sep 17 00:00:00 2001 From: shiyi Date: Sun, 21 Apr 2019 15:21:59 +0200 Subject: [PATCH 1/2] Recommand using the matplotlibrc file to configure the backend --- pyplot.sc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pyplot.sc b/pyplot.sc index 655810f..dcea6cb 100644 --- a/pyplot.sc +++ b/pyplot.sc @@ -1,17 +1,17 @@ ; MIT License -; Copyright guenchi (c) 2018 - 2019 - +; Copyright guenchi (c) 2018 - 2019 + ; Permission is hereby granted, free of charge, to any person obtaining a copy ; of this software and associated documentation files (the "Software"), to deal ; in the Software without restriction, including without limitation the rights ; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell ; copies of the Software, and to permit persons to whom the Software is ; furnished to do so, subject to the following conditions: - + ; The above copyright notice and this permission notice shall be included in all ; copies or substantial portions of the Software. - + ; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE @@ -38,12 +38,10 @@ (only (darkart py ffi) py/run-simple-string)) - (define plt + (define plt (begin (py/run-simple-string "import sys") (py/run-simple-string "sys.argv = ['']") - (py/run-simple-string "import matplotlib") - (py/run-simple-string "matplotlib.use('TkAgg')") (py-import 'matplotlib.pyplot))) From 36b42cf99d21526ece6c9db10d83bafc1dbe9e62 Mon Sep 17 00:00:00 2001 From: shiyi Date: Sun, 21 Apr 2019 16:06:39 +0200 Subject: [PATCH 2/2] Modify the README.md --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index f1fceeb..ea45dbb 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,13 @@ ### powerful plotting library built on the popular Matplotlib +> before running the library, it is necessary to configure the backend. +> Details: https://matplotlib.org/users/customizing.html +Examples: $cat ~/.matplotlib/matplotlibrc +``` +backend: TkAgg +``` + ![image](https://github.com/guenchi/Matplotlib/blob/master/img/Figure_1.png) ```