├── .gitignore ├── LICENSE ├── README.md ├── examples ├── MS2003.png ├── MS2003.svg ├── MS2007.png ├── MS2007.svg ├── clean.png ├── clean.svg ├── minimalist.png ├── minimalist.svg ├── neon.png ├── neon.svg ├── nicoguaro-doc.png ├── nicoguaro-doc.svg ├── tiestos.png ├── tiestos.svg ├── vintage.png └── vintage.svg ├── img └── sin_cos-ex.svg ├── matplotlib_styles.py └── styles ├── MS2003.mplstyle ├── MS2007.mplstyle ├── clean.mplstyle ├── minimalist.mplstyle ├── neon.mplstyle ├── nicoguaro-doc.mplstyle ├── tiestos.mplstyle └── vintage.mplstyle /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | MANIFEST 27 | 28 | # PyInstaller 29 | # Usually these files are written by a python script from a template 30 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 31 | *.manifest 32 | *.spec 33 | 34 | # Installer logs 35 | pip-log.txt 36 | pip-delete-this-directory.txt 37 | 38 | # Unit test / coverage reports 39 | htmlcov/ 40 | .tox/ 41 | .coverage 42 | .coverage.* 43 | .cache 44 | nosetests.xml 45 | coverage.xml 46 | *.cover 47 | .hypothesis/ 48 | .pytest_cache/ 49 | 50 | # Translations 51 | *.mo 52 | *.pot 53 | 54 | # Django stuff: 55 | *.log 56 | local_settings.py 57 | db.sqlite3 58 | 59 | # Flask stuff: 60 | instance/ 61 | .webassets-cache 62 | 63 | # Scrapy stuff: 64 | .scrapy 65 | 66 | # Sphinx documentation 67 | docs/_build/ 68 | 69 | # PyBuilder 70 | target/ 71 | 72 | # Jupyter Notebook 73 | .ipynb_checkpoints 74 | 75 | # pyenv 76 | .python-version 77 | 78 | # celery beat schedule file 79 | celerybeat-schedule 80 | 81 | # SageMath parsed files 82 | *.sage.py 83 | 84 | # Environments 85 | .env 86 | .venv 87 | env/ 88 | venv/ 89 | ENV/ 90 | env.bak/ 91 | venv.bak/ 92 | 93 | # Spyder project settings 94 | .spyderproject 95 | .spyproject 96 | 97 | # Rope project settings 98 | .ropeproject 99 | 100 | # mkdocs documentation 101 | /site 102 | 103 | # mypy 104 | .mypy_cache/ 105 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Nicolás Guarín-Zapata 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Matplotlib style sheets 2 | 3 | This repository was inspired by a post on [my blog](https://nicoguaro.github.io/posts/matplotlib_styles/) related to 4 | the use of style sheets on Matplotlib. The main idea is to create a file with 5 | some of the parameters that want to be defined. 6 | 7 | ## How to use it? 8 | You can use the URL for the style sheet in Python, as the example below. 9 | 10 | ```python 11 | import numpy as np 12 | import matplotlib.pyplot as plt 13 | 14 | repo = "https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/master" 15 | style = repo + "/styles/clean.mplstyle" 16 | with plt.style.context(style): 17 | x = np.linspace(0, 4, 201) 18 | cos = np.cos(np.pi*x) 19 | sin = np.sin(np.pi*x) 20 | plt.plot(x, sin, x, cos) 21 | plt.xlabel("x") 22 | plt.ylabel("y") 23 | plt.savefig("sin_cos-ex.svg") 24 | ``` 25 | 26 | You should get the following result 27 | 28 | Example of use of style sheets 31 | 32 | ## How to contribute? 33 | 34 | If you want to add style sheets to the repository in some of the groups you can 35 | create a Pull Request with the new file under the folder ``styles``. 36 | 37 | ## License 38 | 39 | Style sheets and code are availabe under [MIT license](https://opensource.org/licenses/mit-license.php). 40 | -------------------------------------------------------------------------------- /examples/MS2003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/MS2003.png -------------------------------------------------------------------------------- /examples/MS2003.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 2024-06-09T22:02:27.466063 10 | image/svg+xml 11 | 12 | 13 | Matplotlib v3.8.0, https://matplotlib.org/ 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 263 | 264 | 265 | 266 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 285 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 596 | 597 | 598 | 699 | 700 | 701 | 802 | 803 | 804 | 905 | 906 | 907 | 1008 | 1009 | 1010 | 1013 | 1014 | 1015 | 1018 | 1019 | 1020 | 1023 | 1024 | 1025 | 1028 | 1029 | 1030 | 1031 | 1037 | 1038 | 1039 | 1043 | 1044 | 1045 | 1046 | 1047 | 1048 | 1049 | 1050 | 1051 | 1055 | 1056 | 1057 | 1058 | 1059 | 1060 | 1061 | 1062 | 1063 | 1067 | 1068 | 1069 | 1070 | 1071 | 1072 | 1073 | 1074 | 1075 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1091 | 1092 | 1093 | 1094 | 1095 | 1096 | 1097 | 1098 | 1099 | 1100 | 1101 | 1102 | 1103 | 1104 | 1105 | 1106 | 1107 | -------------------------------------------------------------------------------- /examples/MS2007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/MS2007.png -------------------------------------------------------------------------------- /examples/MS2007.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 2024-06-09T22:02:27.805237 10 | image/svg+xml 11 | 12 | 13 | Matplotlib v3.8.0, https://matplotlib.org/ 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 263 | 264 | 265 | 266 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 285 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 596 | 597 | 598 | 699 | 700 | 701 | 802 | 803 | 804 | 905 | 906 | 907 | 1008 | 1009 | 1010 | 1013 | 1014 | 1015 | 1018 | 1019 | 1020 | 1021 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | -------------------------------------------------------------------------------- /examples/clean.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/clean.png -------------------------------------------------------------------------------- /examples/clean.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 2024-06-09T22:02:26.649287 10 | image/svg+xml 11 | 12 | 13 | Matplotlib v3.8.0, https://matplotlib.org/ 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 46 | 47 | 48 | 49 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 263 | 264 | 265 | 266 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 285 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 596 | 597 | 598 | 699 | 700 | 701 | 802 | 803 | 804 | 905 | 906 | 907 | 1008 | 1009 | 1010 | 1013 | 1014 | 1015 | 1018 | 1019 | 1020 | 1021 | 1025 | 1026 | 1027 | 1028 | 1029 | 1030 | 1031 | 1032 | 1033 | 1037 | 1038 | 1039 | 1040 | 1041 | 1042 | 1043 | 1044 | 1045 | 1049 | 1050 | 1051 | 1052 | 1053 | 1054 | 1055 | 1056 | 1057 | 1061 | 1062 | 1063 | 1064 | 1065 | 1066 | 1067 | 1068 | 1069 | 1073 | 1074 | 1075 | 1076 | 1077 | 1078 | 1079 | 1080 | 1081 | 1082 | 1083 | 1084 | 1085 | 1086 | 1087 | 1088 | 1089 | -------------------------------------------------------------------------------- /examples/minimalist.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/minimalist.png -------------------------------------------------------------------------------- /examples/minimalist.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 2024-06-09T22:02:27.080877 10 | image/svg+xml 11 | 12 | 13 | Matplotlib v3.8.0, https://matplotlib.org/ 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 255 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 536 | 537 | 538 | 639 | 640 | 641 | 742 | 743 | 744 | 845 | 846 | 847 | 948 | 949 | 950 | 953 | 954 | 955 | 958 | 959 | 960 | 961 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | -------------------------------------------------------------------------------- /examples/neon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/neon.png -------------------------------------------------------------------------------- /examples/neon.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 2024-06-09T22:02:28.120539 10 | image/svg+xml 11 | 12 | 13 | Matplotlib v3.8.0, https://matplotlib.org/ 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 255 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 536 | 537 | 538 | 639 | 640 | 641 | 742 | 743 | 744 | 845 | 846 | 847 | 948 | 949 | 950 | 953 | 954 | 955 | 958 | 959 | 960 | 961 | 965 | 966 | 967 | 968 | 969 | 970 | 971 | 972 | 973 | 977 | 978 | 979 | 980 | 981 | 982 | 983 | 984 | 985 | 989 | 990 | 991 | 992 | 993 | 994 | 995 | 996 | 997 | 1001 | 1002 | 1003 | 1004 | 1005 | 1006 | 1007 | 1008 | 1009 | 1013 | 1014 | 1015 | 1016 | 1017 | 1018 | 1019 | 1020 | 1021 | 1022 | 1023 | 1024 | 1025 | 1026 | 1027 | 1028 | 1029 | -------------------------------------------------------------------------------- /examples/nicoguaro-doc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/nicoguaro-doc.png -------------------------------------------------------------------------------- /examples/tiestos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/tiestos.png -------------------------------------------------------------------------------- /examples/vintage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nicoguaro/matplotlib_styles/a5bb4d9487bb321912d037cdebb6fd866d9e46f7/examples/vintage.png -------------------------------------------------------------------------------- /img/sin_cos-ex.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 10 | 11 | 12 | 13 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 70 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 393 | 394 | 395 | 396 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 763 | 764 | 765 | 896 | 897 | 898 | 901 | 902 | 903 | 906 | 907 | 908 | 911 | 912 | 913 | 916 | 917 | 918 | 919 | 920 | 921 | 922 | 923 | 924 | 925 | -------------------------------------------------------------------------------- /matplotlib_styles.py: -------------------------------------------------------------------------------- 1 | """ 2 | Generate examples for all available styles in the repository 3 | 4 | """ 5 | import numpy as np 6 | import matplotlib.pyplot as plt 7 | import os 8 | 9 | folder_in = "styles/" 10 | folder_out = "examples/" 11 | styles = os.listdir(folder_in) 12 | for style in styles: 13 | with plt.style.context(folder_in + style): 14 | x = np.linspace(0, 4, 100) 15 | y = np.sin(np.pi*x + 1e-6)/(np.pi*x + 1e-6) 16 | fig = plt.figure() 17 | ax = plt.subplot(111) 18 | for cont in range(5): 19 | plt.plot(x, y/(cont + 1), label=cont) 20 | box = ax.get_position() 21 | ax.set_position([box.x0, box.y0, box.width * 0.8, box.height]) 22 | plt.legend(bbox_to_anchor=(1, 0.5)) 23 | fname = style.replace("mplstyle", "svg") 24 | plt.savefig(folder_out + fname, bbox_inches="tight") 25 | fname = style.replace("mplstyle", "png") 26 | plt.savefig(folder_out + fname, bbox_inches="tight", dpi=300) 27 | -------------------------------------------------------------------------------- /styles/MS2003.mplstyle: -------------------------------------------------------------------------------- 1 | # file: MS2003.mplstyle 2 | # author: Nicolas Guarin-Zapata 3 | # description: style sheet for Matplotlib figures. 4 | # 5 | # Color palette from: 6 | # http://www.officewriter.com/blog/2013/05/08/excels-color-palette-explained 7 | 8 | 9 | font.family : sans-serif 10 | 11 | axes.facecolor : c0c0c0 12 | axes.edgecolor : black 13 | axes.prop_cycle : cycler('color',['000080', 'FF00FF', 'FFFF00','00FFFF','800080', '800000', '008080', '0000FF']) 14 | axes.grid : True 15 | 16 | axes.spines.left : True 17 | axes.spines.bottom : True 18 | axes.spines.top : True 19 | axes.spines.right : True 20 | 21 | grid.color : black 22 | grid.linestyle : - 23 | 24 | lines.linewidth : 1 25 | 26 | figure.figsize : 5, 3 27 | 28 | legend.fancybox : False 29 | legend.frameon : True 30 | legend.facecolor : white 31 | legend.edgecolor : black 32 | legend.loc : center left 33 | -------------------------------------------------------------------------------- /styles/MS2007.mplstyle: -------------------------------------------------------------------------------- 1 | # file: MS2007.mplstyle 2 | # author: Nicolas Guarin-Zapata 3 | # description: style sheet for Matplotlib figures. 4 | # 5 | # Color palette from: 6 | # http://analyticsdemystified.com/excel-tips/data-visualization-that-is-color-blind-friendly-excel-2007/ 7 | 8 | 9 | font.family : sans-serif 10 | 11 | axes.facecolor : white 12 | axes.edgecolor : 4d4d4d 13 | axes.prop_cycle : cycler('color',['4573a7', 'aa4644', '89a54e', '71588f','4298af', 'db843d', '93a9d0', 'd09392']) 14 | axes.grid : True 15 | axes.linewidth : 0.5 16 | 17 | axes.spines.left : True 18 | axes.spines.bottom : True 19 | axes.spines.top : False 20 | axes.spines.right : False 21 | 22 | lines.linewidth : 2 23 | 24 | grid.color : 4d4d4d 25 | grid.linestyle : - 26 | grid.linewidth : 0.5 27 | 28 | figure.figsize : 5, 3 29 | 30 | legend.fancybox : False 31 | legend.frameon : False 32 | legend.facecolor : white 33 | legend.edgecolor : 4d4d4d 34 | legend.loc : center left 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /styles/clean.mplstyle: -------------------------------------------------------------------------------- 1 | # file: clean.mplstyle 2 | # author: Nicolas Guarin-Zapata 3 | # description: style sheet for Matplotlib figures. 4 | # 5 | # Color palette from: 6 | # http://colorbrewer2.org/#type=qualitative&scheme=Set1&n=8 7 | 8 | 9 | font.family : sans-serif 10 | 11 | axes.facecolor : white 12 | axes.prop_cycle : cycler('color',['e41a1c', '377eb8', '4daf4a', '984ea3', 'ff7f00', 'ffff33', 'a65628', 'f781bf']) 13 | axes.linewidth : 0.0 14 | axes.grid : True 15 | 16 | lines.linewidth : 1.5 17 | 18 | xtick.direction : in 19 | ytick.direction : in 20 | 21 | grid.color : c7dedf 22 | grid.linestyle : - 23 | grid.linewidth : 0.3 24 | 25 | figure.figsize : 6, 4 26 | 27 | legend.fancybox : False 28 | legend.frameon : False 29 | legend.loc : best 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /styles/minimalist.mplstyle: -------------------------------------------------------------------------------- 1 | # Stylesheet for matplotlib 2 | # 3 | # Author: Nicolas Guarin-Zapata 4 | # Date: September 2018 5 | 6 | ### Math Text 7 | mathtext.fontset : cm 8 | 9 | ### Text 10 | text.color : 757575 11 | font.size : 10 12 | 13 | ### Ticks 14 | xtick.color : 757575 15 | ytick.color : 757575 16 | 17 | ### Axes 18 | axes.labelcolor : 757575 19 | axes.edgecolor : 757575 20 | axes.spines.right : False 21 | axes.spines.top : False 22 | axes.prop_cycle : cycler('color', ['348ABD', '7A68A6', 'A60628', '467821', 'CF4457', '188487', 'E24A33']) 23 | 24 | ### Lines 25 | lines.linewidth : 1.5 26 | 27 | ### Figures 28 | figure.figsize : 4, 3 29 | 30 | ### Legends 31 | legend.fancybox : False 32 | legend.frameon : False 33 | -------------------------------------------------------------------------------- /styles/neon.mplstyle: -------------------------------------------------------------------------------- 1 | # Stylesheet for matplotlib 2 | # 3 | # Author: Nicolas Guarin-Zapata 4 | # Date: September 2019 5 | 6 | 7 | ### Text 8 | text.color : D9D9D9 9 | font.size : 10 10 | font.family : sans-serif 11 | 12 | 13 | ### Ticks 14 | xtick.color : D9D9D9 15 | ytick.color : D9D9D9 16 | 17 | ### Axes 18 | axes.labelcolor : D9D9D9 19 | axes.edgecolor : D9D9D9 20 | axes.facecolor : 333333 21 | axes.prop_cycle : cycler('color', ['04D9D9', 'F241A3', 'FA851E', 'BFD91A', 'D9D9D9', '1AA0D9', 'E62F53', 'FEED00']) 22 | 23 | 24 | ### Lines 25 | lines.linewidth : 2.0 26 | 27 | ### Figures 28 | figure.figsize : 4, 3 29 | figure.facecolor : 333333 30 | 31 | ### Legends 32 | legend.fancybox : False 33 | legend.frameon : False 34 | 35 | ### Saving figures 36 | savefig.facecolor : 333333 37 | -------------------------------------------------------------------------------- /styles/nicoguaro-doc.mplstyle: -------------------------------------------------------------------------------- 1 | # file: nicoguaro-doc.mplstyle 2 | # author: Nicolas Guarin-Zapata 3 | # description: style sheet for Matplotlib figures. 4 | 5 | 6 | font.family : serif 7 | font.style : normal 8 | font.weight : normal 9 | font.size : 14 10 | 11 | text.color : black 12 | text.usetex : False 13 | 14 | axes.facecolor : E5E5E5 15 | axes.edgecolor : bcbcbc 16 | axes.labelsize : 14 17 | axes.labelcolor : black 18 | axes.linewidth : 0.0 19 | axes.titlesize : 14 20 | axes.prop_cycle : cycler('color', ['348ABD', '7A68A6', 'A60628', '467821', 'CF4457', '188487', 'E24A33']) 21 | 22 | lines.linewidth : 1.0 23 | lines.linestyle : - 24 | lines.markersize : 6 25 | lines.markeredgewidth : 0.0 26 | 27 | patch.edgecolor : white 28 | 29 | xtick.color : black 30 | xtick.direction : in 31 | xtick.labelsize : 14 32 | 33 | ytick.color : black 34 | ytick.direction : in 35 | ytick.labelsize : 14 36 | 37 | grid.color : white 38 | grid.linestyle : - 39 | grid.linewidth : 1.0 40 | 41 | figure.figsize : 7, 5 42 | figure.facecolor : white 43 | figure.edgecolor : black 44 | figure.dpi : 100 45 | figure.autolayout : True 46 | 47 | legend.fancybox : True 48 | legend.frameon : True 49 | legend.fontsize : 12 50 | legend.loc : best 51 | 52 | savefig.dpi : 300 53 | -------------------------------------------------------------------------------- /styles/tiestos.mplstyle: -------------------------------------------------------------------------------- 1 | # Stylesheet for Matplotlib 2 | # 3 | # Author: Nicolas Guarin-Zapata 4 | # Date: June 2024 5 | 6 | ### Math Text 7 | mathtext.fontset : cm 8 | 9 | ### Text 10 | text.color : 757575 11 | font.size : 10 12 | font.family : sans-serif 13 | font.sans-serif: Open Sans 14 | 15 | ### Ticks 16 | xtick.color : 757575 17 | ytick.color : 757575 18 | 19 | ### Axes 20 | axes.labelcolor : 757575 21 | axes.edgecolor : 757575 22 | axes.spines.right : False 23 | axes.spines.top : False 24 | axes.prop_cycle : cycler('color', ['E574BC', '028090', 'FE5D26', '1C1F33', 'C1F7DC']) 25 | axes.linewidth : 1.0 26 | 27 | ### Lines 28 | lines.linewidth : 2.0 29 | 30 | ### Figures 31 | figure.figsize : 5.5, 3.5 32 | figure.autolayout : True 33 | 34 | ### Images 35 | image.cmap: magma 36 | image.lut: 24 37 | 38 | ### Legends 39 | legend.fancybox : False 40 | legend.frameon : False 41 | 42 | ### Saving figures 43 | savefig.dpi : 300 -------------------------------------------------------------------------------- /styles/vintage.mplstyle: -------------------------------------------------------------------------------- 1 | # Stylesheet for matplotlib 2 | # 3 | # Author: Nicolas Guarin-Zapata 4 | # Date: April 2020 5 | 6 | 7 | ### Text 8 | text.color : 1A1A1A 9 | font.size : 12 10 | font.family : serif 11 | font.serif : Computer Modern Roman 12 | 13 | ### Ticks 14 | xtick.color : 1A1A1A 15 | ytick.color : 1A1A1A 16 | 17 | ### Axes 18 | axes.labelcolor : 1A1A1A 19 | axes.edgecolor : 1A1A1A 20 | axes.facecolor : FDF4D9 21 | axes.prop_cycle : cycler('color', ['b12d44', '4c5684', '137e93', 'b2b745', 'eb5f32', 'fcc30d']) 22 | axes.linewidth : 1.0 23 | axes.grid : True 24 | axes.autolimit_mode : round_numbers #data 25 | axes.xmargin : 0.0 26 | axes.ymargin : 0.0 27 | 28 | ### Grids 29 | grid.color : bdcbc8 30 | grid.linestyle : - 31 | grid.linewidth : 0.5 32 | 33 | 34 | ### Lines 35 | lines.linewidth : 2.0 36 | 37 | ### Figures 38 | figure.figsize : 8, 5 39 | figure.facecolor : FDF4D9 40 | 41 | ### Legends 42 | legend.fancybox : True 43 | legend.frameon : True 44 | legend.edgecolor : bdcbc8 45 | legend.facecolor : white 46 | legend.loc : best 47 | 48 | ### Saving figures 49 | savefig.facecolor : FDF4D9 50 | --------------------------------------------------------------------------------