kitikiplot 0.2.9__py3-none-any.whl → 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kitikiplot/core/kitiki_cell.py +12 -9
- kitikiplot/core/kitikiplot.py +5 -9
- kitikiplot/ecology/grid.py +54 -0
- kitikiplot/ecology/linear.py +29 -11
- kitikiplot/genomics/grid.py +1 -1
- {kitikiplot-0.2.9.dist-info → kitikiplot-1.0.0.dist-info}/METADATA +5 -5
- kitikiplot-1.0.0.dist-info/RECORD +13 -0
- kitikiplot-0.2.9.dist-info/RECORD +0 -12
- {kitikiplot-0.2.9.dist-info → kitikiplot-1.0.0.dist-info}/LICENSE +0 -0
- {kitikiplot-0.2.9.dist-info → kitikiplot-1.0.0.dist-info}/WHEEL +0 -0
kitikiplot/core/kitiki_cell.py
CHANGED
@@ -150,7 +150,6 @@ class KitikiCell(ColorConfig):
|
|
150
150
|
|
151
151
|
if focus == None:
|
152
152
|
rect_dim= ( dim_x, dim_y )
|
153
|
-
print( x, y, dim_x, dim_y )
|
154
153
|
|
155
154
|
else:
|
156
155
|
|
@@ -162,10 +161,12 @@ class KitikiCell(ColorConfig):
|
|
162
161
|
|
163
162
|
max_y= cell_height*(self.cols-1)+ ((self.rows)*self.stride*cell_height)
|
164
163
|
|
165
|
-
if (
|
166
|
-
|
167
|
-
|
168
|
-
|
164
|
+
if kitiki_cell_kwargs.get("alpha", None) == None:
|
165
|
+
|
166
|
+
if (focus_dim_y > max_y - (cell_height*self.window_length + cell_height*x*self.stride)) and (focus_dim_y <= max_y - (cell_height*x*self.stride)):
|
167
|
+
kitiki_cell_kwargs["alpha"]= 1
|
168
|
+
else:
|
169
|
+
kitiki_cell_kwargs["alpha"]= focus_alpha
|
169
170
|
|
170
171
|
# Adjust dimensions if 'transpose' is set to 'True'
|
171
172
|
else:
|
@@ -189,10 +190,12 @@ class KitikiCell(ColorConfig):
|
|
189
190
|
min_dim_x= cell_height + align_factor
|
190
191
|
max_dim_x= cell_height*(self.cols)+ align_factor
|
191
192
|
|
192
|
-
if
|
193
|
-
|
194
|
-
|
195
|
-
|
193
|
+
if kitiki_cell_kwargs.get("alpha", None) == None:
|
194
|
+
|
195
|
+
if (min_dim_x <= dim_x) and (dim_x <= max_dim_x):
|
196
|
+
kitiki_cell_kwargs["alpha"]= 1
|
197
|
+
else:
|
198
|
+
kitiki_cell_kwargs["alpha"]= focus_alpha
|
196
199
|
|
197
200
|
|
198
201
|
# Clean up all local variables for efficient memory management
|
kitikiplot/core/kitikiplot.py
CHANGED
@@ -198,6 +198,9 @@ class KitikiPlot(KitikiCell):
|
|
198
198
|
legend_hatch : bool (optional)
|
199
199
|
- A flag indicating whether to include hatch patterns in the legend.
|
200
200
|
- Default is False.
|
201
|
+
return_figure: bool (optional)
|
202
|
+
- A flag indicating whether to return plot.
|
203
|
+
- Default is False.
|
201
204
|
legend_kwargs : dict (optional)
|
202
205
|
- Additional keyword arguments passed to customize the legend.
|
203
206
|
- Default is {}.
|
@@ -253,12 +256,6 @@ class KitikiPlot(KitikiCell):
|
|
253
256
|
else:
|
254
257
|
col_range= self.cols
|
255
258
|
|
256
|
-
|
257
|
-
print("Total Data: ", each_sample)
|
258
|
-
print( "Window Range: ", window_range)
|
259
|
-
print( "COlumns Range: ", col_range)
|
260
|
-
print( "Each sample length: ", each_sample.shape[0] )
|
261
|
-
|
262
259
|
# Generate cells for each sample in the specified window range and time frame columns
|
263
260
|
for index in window_range:
|
264
261
|
|
@@ -268,9 +265,9 @@ class KitikiPlot(KitikiCell):
|
|
268
265
|
for time_frame in range( col_range ):
|
269
266
|
|
270
267
|
if type(focus) != bool:
|
271
|
-
|
268
|
+
|
272
269
|
kitiki_cell_kwargs["alpha"]= focus_alpha if focus != None and ( time_frame< focus[0] or time_frame>= focus[1] ) else 1
|
273
|
-
|
270
|
+
|
274
271
|
# Create each cell using specified parameters and add it to patches list
|
275
272
|
cell_gen= self.create( x= index,
|
276
273
|
y= time_frame,
|
@@ -342,7 +339,6 @@ class KitikiPlot(KitikiCell):
|
|
342
339
|
# Configure default yticks
|
343
340
|
else:
|
344
341
|
|
345
|
-
print(y_positions)
|
346
342
|
# Set y-ticks with appropriate labels and rotation
|
347
343
|
plt.yticks( y_positions, [ytick_prefix+"_"+str(i) for i in range(col_range)], rotation= yticks_rotation)
|
348
344
|
|
@@ -0,0 +1,54 @@
|
|
1
|
+
"""
|
2
|
+
File Name: linear.py
|
3
|
+
Description: This file defines grid concentration plot for ecological data visualization
|
4
|
+
Author: Boddu Sri Pavan
|
5
|
+
Date Created: 31-05-2025
|
6
|
+
Last Modified: 31-05-2025
|
7
|
+
"""
|
8
|
+
|
9
|
+
from kitikiplot.core import KitikiPlot
|
10
|
+
|
11
|
+
def plot( data, stride, window_length,
|
12
|
+
cmap= {},
|
13
|
+
figsize= (20, 5),
|
14
|
+
focus= True,
|
15
|
+
focus_alpha= 0.2,
|
16
|
+
transpose= True,
|
17
|
+
align= False,
|
18
|
+
xlabel= "Time",
|
19
|
+
ylabel= "Sliding Windows of CO(GT) values (in mg/m^3)",
|
20
|
+
display_xticks= True,
|
21
|
+
xticks_values= [],
|
22
|
+
yticks_values= [],
|
23
|
+
ytick_prefix= "Window",
|
24
|
+
xticks_rotation= 90,
|
25
|
+
display_legend= True,
|
26
|
+
title= "CO(GT) Trend in Air",
|
27
|
+
legend_kwargs= {"bbox_to_anchor": (1.01, 1), "loc":'upper left', "borderaxespad": 0.}
|
28
|
+
):
|
29
|
+
"""
|
30
|
+
Grid Plot for ecological data.
|
31
|
+
Focus can be set to highlight particular time-interval of sliding window.
|
32
|
+
"""
|
33
|
+
|
34
|
+
ktk= KitikiPlot( data= data, stride= stride, window_length= window_length )
|
35
|
+
|
36
|
+
ktk.plot(
|
37
|
+
figsize= (20, 5),
|
38
|
+
cell_width= 2,
|
39
|
+
cmap= cmap,
|
40
|
+
focus= focus,
|
41
|
+
focus_alpha= focus_alpha,
|
42
|
+
transpose= transpose,
|
43
|
+
align= align,
|
44
|
+
xlabel= xlabel,
|
45
|
+
ylabel= ylabel,
|
46
|
+
display_xticks= display_xticks,
|
47
|
+
xticks_values= xticks_values,
|
48
|
+
yticks_values= yticks_values,
|
49
|
+
ytick_prefix= ytick_prefix,
|
50
|
+
xticks_rotation= xticks_rotation,
|
51
|
+
display_legend= display_legend,
|
52
|
+
title= title,
|
53
|
+
legend_kwargs= legend_kwargs
|
54
|
+
)
|
kitikiplot/ecology/linear.py
CHANGED
@@ -8,23 +8,41 @@ Last Modified: 25-05-2025
|
|
8
8
|
|
9
9
|
from kitikiplot.core import KitikiPlot
|
10
10
|
|
11
|
-
def plot(
|
12
|
-
|
13
|
-
|
11
|
+
def plot(
|
12
|
+
data, focus, focus_alpha, xlabel, ylabel, xticks_values, ytick_prefix,
|
13
|
+
stride= 1,
|
14
|
+
figsize= (20,1),
|
15
|
+
cell_width= 2,
|
16
|
+
transpose= True,
|
17
|
+
display_xticks= True,
|
18
|
+
xticks_rotation= 90,
|
19
|
+
display_legend= True,
|
20
|
+
title= "Linear Plot: Ecology Data Visualization",
|
21
|
+
return_figure= True,
|
22
|
+
legend_kwargs= {"bbox_to_anchor": (1.01, 1), "loc":'upper left', "borderaxespad": 0.},
|
23
|
+
cmap= {}
|
24
|
+
):
|
25
|
+
"""
|
26
|
+
Linear Plot for ecological data.
|
27
|
+
Focus can be set to highlight particular time-interval
|
28
|
+
"""
|
29
|
+
|
30
|
+
ktk= KitikiPlot( data= data, stride= stride, window_length= len(data) )
|
14
31
|
|
15
32
|
ktk.plot(
|
16
|
-
figsize=
|
17
|
-
cell_width=
|
33
|
+
figsize= figsize,
|
34
|
+
cell_width= cell_width,
|
18
35
|
cmap= cmap,
|
19
36
|
focus= focus,
|
20
37
|
focus_alpha= focus_alpha,
|
21
|
-
transpose=
|
38
|
+
transpose= transpose,
|
22
39
|
xlabel= xlabel,
|
23
40
|
ylabel= ylabel,
|
24
|
-
display_xticks=
|
41
|
+
display_xticks= display_xticks,
|
25
42
|
xticks_values= xticks_values,
|
26
43
|
ytick_prefix= ytick_prefix,
|
27
|
-
xticks_rotation=
|
28
|
-
display_legend=
|
29
|
-
title=
|
30
|
-
|
44
|
+
xticks_rotation= xticks_rotation,
|
45
|
+
display_legend= display_legend,
|
46
|
+
title= title,
|
47
|
+
return_figure= return_figure,
|
48
|
+
legend_kwargs= legend_kwargs)
|
kitikiplot/genomics/grid.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: kitikiplot
|
3
|
-
Version: 0.
|
3
|
+
Version: 1.0.0
|
4
4
|
Summary: A Python library to visualize categorical sliding window data.
|
5
5
|
License: MIT
|
6
6
|
Keywords: sliding window,sequential,time-series,genome,categorical data
|
@@ -14,10 +14,10 @@ Classifier: Programming Language :: Python :: 3.11
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.12
|
15
15
|
Classifier: Programming Language :: Python :: 3.13
|
16
16
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
17
|
-
Requires-Dist: biopython
|
18
|
-
Requires-Dist: matplotlib
|
19
|
-
Requires-Dist: numpy
|
20
|
-
Requires-Dist: pandas
|
17
|
+
Requires-Dist: biopython
|
18
|
+
Requires-Dist: matplotlib
|
19
|
+
Requires-Dist: numpy
|
20
|
+
Requires-Dist: pandas
|
21
21
|
Project-URL: Bug Tracker, https://github.com/BodduSriPavan-111/kitikiplot/issues
|
22
22
|
Project-URL: Documentation, https://github.com/BodduSriPavan-111/kitikiplot/wiki
|
23
23
|
Project-URL: Repository, https://github.com/BodduSriPavan-111/kitikiplot
|
@@ -0,0 +1,13 @@
|
|
1
|
+
kitikiplot/core/__init__.py,sha256=7LpJy1V-PZ-JlfjsnRMjMXxTKaFt0JP0mj-A0SgS-sE,34
|
2
|
+
kitikiplot/core/kitiki_cell.py,sha256=acYIsPw-WW75OXq7dw5b6NJ9gn6eM7sSc70OHwbitVg,8536
|
3
|
+
kitikiplot/core/kitiki_color_config.py,sha256=yOWnJNoYo1BN7UMGTFgc8zpMljBbNpFDLLq7JZF3ATE,11857
|
4
|
+
kitikiplot/core/kitikiplot.py,sha256=eDW8-urInxpdFrViPk8CDk9eOt9uLbDHRH9ggzwHxeQ,21144
|
5
|
+
kitikiplot/ecology/grid.py,sha256=DdXyu2B4IGLADG5a20go17AMXG6Iv93wKQdG-SQ-_Ik,1684
|
6
|
+
kitikiplot/ecology/linear.py,sha256=RmpIHQvETL0a6GN2cUHlQd0VXbE0hepojG0NxQIVca8,1565
|
7
|
+
kitikiplot/genomics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
8
|
+
kitikiplot/genomics/grid.py,sha256=E-a1Ir0Q-kjGT5JU7HGdHFs5RWjFi4GIogktPrTFWmA,1829
|
9
|
+
kitikiplot/genomics/linear.py,sha256=BNO-9xPVq6dsP8KuXx1fJRG_mLUf2orCM3h7etYqhBw,1280
|
10
|
+
kitikiplot-1.0.0.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
|
11
|
+
kitikiplot-1.0.0.dist-info/METADATA,sha256=ieqLus54ejy29ZZL6PPjAh-brAch-UxtxmWZy69KtN0,5405
|
12
|
+
kitikiplot-1.0.0.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
13
|
+
kitikiplot-1.0.0.dist-info/RECORD,,
|
@@ -1,12 +0,0 @@
|
|
1
|
-
kitikiplot/core/__init__.py,sha256=7LpJy1V-PZ-JlfjsnRMjMXxTKaFt0JP0mj-A0SgS-sE,34
|
2
|
-
kitikiplot/core/kitiki_cell.py,sha256=bSAXCHLEQ8-XCln_YIk2EyMwdFpl_N1wUlf1l3-t8Fs,8410
|
3
|
-
kitikiplot/core/kitiki_color_config.py,sha256=yOWnJNoYo1BN7UMGTFgc8zpMljBbNpFDLLq7JZF3ATE,11857
|
4
|
-
kitikiplot/core/kitikiplot.py,sha256=z_ujN0pTurNwaixYBI9GK4z5p89yoF51SxK1ZD9fdYQ,21254
|
5
|
-
kitikiplot/ecology/linear.py,sha256=l1YVn7vcsKU-1g3SZ9kpOhHQiCRqP8U3LrWecy7_KFo,985
|
6
|
-
kitikiplot/genomics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
|
-
kitikiplot/genomics/grid.py,sha256=ohg5fBVezzxIOr2TlNPhND4PpBvzVG0eiSklTTbQp5s,1831
|
8
|
-
kitikiplot/genomics/linear.py,sha256=BNO-9xPVq6dsP8KuXx1fJRG_mLUf2orCM3h7etYqhBw,1280
|
9
|
-
kitikiplot-0.2.9.dist-info/LICENSE,sha256=14Bs-3ieyNjj9kCnVLv8CHRXEvQVM6P5uLe-pz7cBI0,1088
|
10
|
-
kitikiplot-0.2.9.dist-info/METADATA,sha256=u2KynFUNCePOPrgzrEyxOosXFDzK316dg2lJrEjJJ94,5445
|
11
|
-
kitikiplot-0.2.9.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
|
12
|
-
kitikiplot-0.2.9.dist-info/RECORD,,
|
File without changes
|
File without changes
|