sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.3k stars 447 forks source link

Add drawing tools in misc to produce tikz code #26508

Open c270b1b6-1da3-4e49-b2c9-ab561f083022 opened 5 years ago

c270b1b6-1da3-4e49-b2c9-ab561f083022 commented 5 years ago

We need to refactor Parallelogram polyominoes by moving all drawing tools present in sage/combinat/parallelogram_polyomino.py into a new class DrawingTool inside sage/misc/tikz.py.

This class have to merge all drawing tools coming from parallelogram_polyomino.py and all drawing tools coming from the package TikzPicture of sebastien labbe.

For example, if you install that package with sage -pip install slabbe, and if you use ParallelogramPolyomino to test the package, you may do :

sage: L = [[0,0,0,1,1,0,1,0,0,1,1,1],[1,1,1,0,0,1,1,0,0,1,0,0]]
sage: pp = ParallelogramPolyomino(L)
sage: from slabbe import TikzPicture
sage: TikzPicture(latex(pp)).pdf()
'[...]/62669/tikz_mZXN3H.pdf'

See Ticket #16110 for more informations about ParallelogramPolyominoes refactorisation.

CC: @seblabbe

Component: misc

Keywords: tikz, drawing tools, refactoring, parallelogram polyomino, thursdaysbdx

Author: boussica

Branch/Commit: u/boussica/add_drawing_tools_in_misc_to_produce_tikz_code @ 1e67746

Issue created by migration from https://trac.sagemath.org/ticket/26508

c270b1b6-1da3-4e49-b2c9-ab561f083022 commented 5 years ago

Description changed:

--- 
+++ 
@@ -14,4 +14,5 @@
 '[...]/62669/tikz_mZXN3H.pdf'

+See Ticket #16110 for more informations about ParallelogramPolyominoes refactorisation.

c270b1b6-1da3-4e49-b2c9-ab561f083022 commented 5 years ago

Branch: u/boussica/add_drawing_tools_in_misc_to_produce_tikz_code

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Commit: 74f7a42

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

74f7a42Trac #26508 tbc. move XY param. into tikz options
7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Changed commit from 74f7a42 to 1e67746

7ed8c4ca-6d56-4ae9-953a-41e42b4ed313 commented 5 years ago

Branch pushed to git repo; I updated commit sha1. New commits:

0b6367eTrac #26508 tbc. Add test + Pep8
1e67746Trac #26508 Improve doc