Skip to content

Commit cf84a6c

Browse files
committed
Update README
1 parent 60fd483 commit cf84a6c

2 files changed

Lines changed: 41 additions & 36 deletions

File tree

README.md

Lines changed: 34 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,27 @@ If you want to use developmental version, it can be installed using the followin
1616
`pip install git+https://github.com/ponnhide/patchworklib.git`
1717

1818
## News
19+
#### 04222022: Version 0.4.2 is released.
20+
- A few bugs were fixed.
21+
1922
#### 04182022: Version 0.4.1 is released.
2023
- `load_seaborngrid` can accepts a `seaborn.clustermap` plot. For details, see example code on [Google colab](https://colab.research.google.com/drive/1wQQyBHLNXJ5Ks6ev88IjXhGfT98SGJuM?usp=sharing)
21-
- Some bugs were fixed.
24+
- A few bugs were fixed.
2225

2326
#### 03272022: Version 0.4.0 is released.
24-
- Add docstring for each method and class
25-
- Add some new methods of `patchworklib.Bricks` class to set common label, title, spine and colorbar for `Brick` objets in the `Bricks` object.
27+
- Add docstring for each method and class.
28+
- Add several new methods of `patchworklib.Bricks` class to set common label, title, spine and colorbar for `Brick` objets in the `Bricks` object.
2629
 For usage, please refer to the docstring or the example codes on [Google colab](https://colab.research.google.com/drive/1f06AQOqNnSYPjc9EkweC3_Hmy4abr-go?usp=sharing).
2730

2831
#### 02042022: Version 0.3.6 is released.
29-
- Sum bugs relating with the function to arrange multiple polar plot objects.
32+
- A few bugs relating with the function to arrange multiple polar plot objects.
3033

3134
#### 02042022: Version 0.3.5 is released.
32-
- Some bugs in `move_legend` were fixed. (The `move_legend` for seaborn grided plot was not working properly.)
35+
- A few bugs in `move_legend` were fixed. (The `move_legend` for seaborn grided plot was not working properly.)
3336
- Improved the speed of `savefig` operation.
3437

3538
#### 01242022: Version 0.3.3 is released.
36-
- Some bugs were fixed
39+
- A few bugs were fixed.
3740

3841
#### 01222022: Version 0.3.0 is released.
3942
<details>
@@ -46,11 +49,11 @@ https://colab.research.google.com/drive/1tkn7pxRqh9By5rTFqRbVNDVws-o-ySz9?usp=sh
4649
</details>
4750

4851
#### 01212022: Version 0.2.1 is released.
49-
- Some bugs for 'load_seaborngrid' were fixed.
52+
- A few bugs for 'load_seaborngrid' were fixed.
5053

5154
#### 01202022: Version 0.2.0 is released.
5255
<details>
53-
<summary> Patchworklib is now possible to arrange Seabron gridded plots. The "stack" function is added. Some bugs were fixed. </summary>
56+
<summary> Patchworklib is now possible to arrange Seabron gridded plots. The "stack" function is added. A few bugs were fixed. </summary>
5457

5558
#### Arranging seaborn gridded plots
5659
Patchworklib supported the function to arange multiple seborn plots generated based on axisgrid (FacetGrid, PairGrid, and JointGrid).
@@ -216,21 +219,22 @@ ax12 = ax1|ax2
216219
ax12.savefig("ax12.png")
217220
```
218221

219-
<img src="img/ax12.png" width="600x600">
222+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax12.png" width="600x600">
220223

221224
Jupyter Notebook files for all of the example codes are provided in `./example` and also made executable in Google Colaboratory.
222-
- [tutorial](https://colab.research.google.com/drive/1TVcH3IJy6geDXVJDfOKCPFPsP2GzjxHu?usp=sharing)
223-
- [subplot4plotnine](https://colab.research.google.com/drive/17otXpvh-jLn0joI2MwdyT6RKJzx6Anwp?usp=sharing)
224-
- [subplot4seaborngrid](https://colab.research.google.com/drive/1C1EN1-5L2QjnAAVo4vpx_i9knDRzX4jy?usp=sharing)
225+
- [tutorial](https://colab.research.google.com/drive/1TVcH3IJy6geDXVJDfOKCPFPsP2GzjxHu?usp=sharing): Basic example codes of patchworklib
226+
- [subplot4plotnine](https://colab.research.google.com/drive/17otXpvh-jLn0joI2MwdyT6RKJzx6Anwp?usp=sharing): Arranging plotnine plots using patchworklib
227+
- [subplot4seaborngrid](https://colab.research.google.com/drive/1C1EN1-5L2QjnAAVo4vpx_i9knDRzX4jy?usp=sharing): Arranging figure level seaborn plots using patchworklib
228+
-
225229

226230
Also, please see https://python.plainenglish.io/a-subplot-manager-for-intuitive-layout-in-matplotlib-bd037fe967f4
227231
## Gallery
228232

229233
**Arrangement of multiple axis-level seaborn plots**
230-
<img src="img/ax35214_v3.png" width="1000x1000">
234+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v3.png" width="1000x1000">
231235

232236
**Arrangement of multiple Plotnine plots**
233-
<img src="img/plotnine.png" width="1000x1000">
237+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/plotnine.png" width="1000x1000">
234238

235239
**Arrangement of multiple figure-level seaborn plots**
236240
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i9d3yogctq64s6j33iyb.png" width="1000x1000">
@@ -271,7 +275,7 @@ ax1.set_title("ax1")
271275
ax1.savefig()
272276
```
273277

274-
<img src="img/ax1.png" width="350x350">
278+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax1.png" width="350x350">
275279

276280
Brick class provides the `movelegend(`*`loc=str, bbox_to_anchor=(float,float)`*`)` method. By using this method, legend location can be quickly modified.
277281

@@ -285,7 +289,7 @@ ax2.set_title("ax2")
285289
ax2.savefig()
286290
```
287291

288-
<img src="img/ax2.png" width="250x250">
292+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax2.png" width="250x250">
289293

290294
```python
291295
#Example plot 3 (ref: https://seaborn.pydata.org/examples/histogram_stacked.html)
@@ -298,7 +302,7 @@ ax3.set_title("ax3")
298302
ax3.savefig()
299303
```
300304

301-
<img src="img/ax3.png" width="400x400">
305+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax3.png" width="400x400">
302306

303307
```python
304308
#Example plot 4 (ref:https://seaborn.pydata.org/examples/grouped_violinplots.html)
@@ -312,7 +316,7 @@ ax4.set_title("ax4")
312316
ax4.savefig("../img/ax4.png")
313317
```
314318

315-
<img src="img/ax4.png" width="400x400">
319+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax4.png" width="400x400">
316320

317321
```python
318322
#Example plot 5 (ref:https://seaborn.pydata.org/examples/wide_data_lineplot.html)
@@ -329,7 +333,7 @@ ax5.set_title("ax5")
329333
ax5.savefig()
330334
```
331335

332-
<img src="img/ax5.png" width="400x400">
336+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax5.png" width="400x400">
333337

334338
#### 3. Arranging and stacking plots
335339

@@ -341,7 +345,7 @@ ax124 = ax1|ax2|ax4
341345
ax124.savefig("../img/ax124.png")
342346
```
343347

344-
<img src="img/ax124.png" width="1000x1000">
348+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax124.png" width="1000x1000">
345349

346350
The object generated by arranging multiple Brick object (Bricks class object) can also be arranged and stacked with other Brick objects. Additionally, It is possible to create more complex layouts by nesting the operations.
347351

@@ -350,7 +354,7 @@ ax12435 = ax124/(ax3|ax5)
350354
ax12435.savefig("../img/ax12435.png")
351355
```
352356

353-
<img src="img/ax12435.png" width="1000x1000">
357+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax12435.png" width="1000x1000">
354358

355359
You can quickly test another layout by rearranging them.
356360

@@ -359,7 +363,7 @@ ax35214 = (ax3/(ax2|ax1))|(ax5/ax4)
359363
ax35214.savefig()
360364
```
361365

362-
<img src="img/ax35214.png" width="1000x1000">
366+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214.png" width="1000x1000">
363367

364368
If you want to adjust the margins between objects, please change the value of `.param["margin"]`.
365369

@@ -369,7 +373,7 @@ ax35214 = (ax3/(ax2|ax1))|(ax5/ax4)
369373
ax35214.savefig("../img/ax35214_v1.1.png")
370374
```
371375

372-
<img src="img/ax35214_v1.1.png" width="1000x1000">
376+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v1.1.png" width="1000x1000">
373377

374378
Also, the aspect ratios of each plot can be freely modifiable.
375379

@@ -382,7 +386,7 @@ ax35214_v2 = (ax3/(ax2|ax1))|(ax5/ax4)
382386
ax35214_v2.savefig()
383387
```
384388

385-
<img src="img/ax35214_v2.png" width="1400x1400">
389+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v2.png" width="1400x1400">
386390

387391
#### 4. Packing plots with label indexing (Advanced method)
388392

@@ -393,30 +397,28 @@ ax321 = ax3/(ax2|ax1)
393397
ax321.savefig("../img/ax321.png")
394398
```
395399

396-
<img src="img/ax321.png" width="600x600">
400+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax321.png" width="600x600">
397401

398402
```python
399403
ax3214 = ax321["ax1"]|ax4
400404
ax3214.savefig("../img/ax3214.png")
401405
```
402406

403-
<img src="img/ax3214.png" width="1000x1000">
407+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax3214.png" width="1000x1000">
404408

405409
```python
406410
ax35214_v3 = ax3214["ax3"]|ax5
407411
ax35214_v3.savefig("../img/ax35214_v3.png")
408412
```
409413

410-
<img src="img/ax35214_v3.png" width="1000x1000">
414+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v3.png" width="1000x1000">
411415

412416
The above packing process allows the axes of the objects to be accurately aligned with each other. Actually, in "ax35214" and "ax35214_v2", the bottom axis lines of ax3 and ax5 are not precisely aligned, while in "ax35214_v3", their bottom axis lines are exactly aligned. However, please note that this packing method using label indexing changes aspect ratios of the Brick objects to be packed from the original one to align their axis lines with others.
413417

414-
<img src="img/ax35214_wl.png" width="600x600">
415-
416-
<img src="img/ax35214_v2_wl.png" width="600x600">
418+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_wl.png" width="600x600">
417419

418-
<img src="img/ax35214_v3_wl.png" width="600x600">
420+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v2_wl.png" width="600x600">
419421

420-
By using the method, [Jointplot](https://seaborn.pydata.org/generated/seaborn.jointplot.html) style layout can be easily designed. Please see [tutorial1](https://colab.research.google.com/drive/1TVcH3IJy6geDXVJDfOKCPFPsP2GzjxHu?usp=sharing) and [tutorial2](https://colab.research.google.com/drive/142gBg6Q8hRWTw95yqM5G_P4E2T5pDLrX?usp=sharing).
422+
<img src="https://raw.githubusercontent.com/ponnhide/patchworklib/main/img/ax35214_v3_wl.png" width="600x600">
421423

422424
</details>

setup.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,14 @@
33
# Copyright (C) Hideto Mori
44

55

6-
DESCRIPTION = "patchwork for matplotlib"
7-
LONG_DESCRIPTION = ""
8-
6+
DESCRIPTION = "patchwork for matplotlib"
97
DISTNAME = 'patchworklib'
108
MAINTAINER = 'Hideto Mori'
119
MAINTAINER_EMAIL = 'hidto7592@gmail.com'
1210
URL = 'https://github.com/ponnhide/patchworklib'
1311
LICENSE = 'GNU General Public License v3.0'
1412
DOWNLOAD_URL = 'https://github.com/ponnhide/patchworklib'
15-
VERSION = '0.4.1'
13+
VERSION = '0.4.2'
1614
PYTHON_REQUIRES = ">=3.7"
1715

1816
INSTALL_REQUIRES = [
@@ -34,6 +32,10 @@
3432
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
3533
]
3634

35+
with open('README.md', 'r', encoding='utf-8') as fp:
36+
readme = fp.read()
37+
LONG_DESCRIPTION = readme
38+
LONG_DESCRIPTION_CONTENT_TYPE = 'text/markdown'
3739

3840
if __name__ == "__main__":
3941
from setuptools import setup
@@ -49,6 +51,7 @@
4951
maintainer_email=MAINTAINER_EMAIL,
5052
description=DESCRIPTION,
5153
long_description=LONG_DESCRIPTION,
54+
long_description_content_type=LONG_DESCRIPTION_CONTENT_TYPE,
5255
license=LICENSE,
5356
url=URL,
5457
version=VERSION,

0 commit comments

Comments
 (0)