seolpyo-mplchart 0.0.3__tar.gz → 0.0.5__tar.gz

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.

Potentially problematic release.


This version of seolpyo-mplchart might be problematic. Click here for more details.

Files changed (21) hide show
  1. {seolpyo_mplchart-0.0.3/seolpyo_mplchart.egg-info → seolpyo_mplchart-0.0.5}/PKG-INFO +14 -4
  2. seolpyo_mplchart-0.0.5/README.md +20 -0
  3. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/pyproject.toml +6 -6
  4. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/draw.py +9 -9
  5. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/slider.py +13 -5
  6. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5/seolpyo_mplchart.egg-info}/PKG-INFO +14 -4
  7. seolpyo_mplchart-0.0.5/seolpyo_mplchart.egg-info/requires.txt +2 -0
  8. seolpyo_mplchart-0.0.3/README.md +0 -10
  9. seolpyo_mplchart-0.0.3/seolpyo_mplchart.egg-info/requires.txt +0 -2
  10. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/MANIFEST.in +0 -0
  11. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/__init__.py +0 -0
  12. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/base.py +0 -0
  13. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/cursor.py +0 -0
  14. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/data/apple.txt +0 -0
  15. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/data/samsung.txt +0 -0
  16. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/test.py +0 -0
  17. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart/utils.py +0 -0
  18. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart.egg-info/SOURCES.txt +0 -0
  19. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart.egg-info/dependency_links.txt +0 -0
  20. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/seolpyo_mplchart.egg-info/top_level.txt +0 -0
  21. {seolpyo_mplchart-0.0.3 → seolpyo_mplchart-0.0.5}/setup.cfg +0 -0
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: seolpyo-mplchart
3
- Version: 0.0.3
4
- Summary: Fast candlestick chart using Python.
3
+ Version: 0.0.5
4
+ Summary: Fast candlestick chart using Python. Includes navigator, slider, navigation, and text information display functions
5
5
  Author-email: white-seolpyo <white-seolpyo@naver.com>
6
6
  License: MIT License
7
7
  Project-URL: Homepage, https://white.seolpyo.com/
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
23
  Requires-Python: >=3.11
24
24
  Description-Content-Type: text/markdown
25
- Requires-Dist: matplotlib>=3.9.2
26
- Requires-Dist: pandas>=2.2.2
25
+ Requires-Dist: matplotlib>=3.7.0
26
+ Requires-Dist: pandas>=2.0.0
27
27
 
28
28
  # Donation
29
29
  Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
@@ -35,3 +35,13 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
35
35
  [English](https://white.seolpyo.com/entry/148/)
36
36
 
37
37
  [한글](https://white.seolpyo.com/entry/147/)
38
+
39
+
40
+ # Sample
41
+ ![sample gif](https://github.com/user-attachments/assets/f1732891-d458-4c2d-a6bf-a17a4c549af6)
42
+
43
+ ![tkinter sample gif](https://github.com/user-attachments/assets/b9bd451c-71a7-4295-9bcc-0d2f7d440bbd)
44
+
45
+ ![english sample](https://raw.githubusercontent.com/white-seolpyo/seolpyo-mplchart/refs/heads/main/images/change%20format.png)
46
+
47
+ ![korean sample](https://github.com/white-seolpyo/seolpyo-mplchart/blob/main/images/sample%20kor.png?raw=true)
@@ -0,0 +1,20 @@
1
+ # Donation
2
+ Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
3
+
4
+ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
5
+
6
+
7
+ # Document
8
+ [English](https://white.seolpyo.com/entry/148/)
9
+
10
+ [한글](https://white.seolpyo.com/entry/147/)
11
+
12
+
13
+ # Sample
14
+ ![sample gif](https://github.com/user-attachments/assets/f1732891-d458-4c2d-a6bf-a17a4c549af6)
15
+
16
+ ![tkinter sample gif](https://github.com/user-attachments/assets/b9bd451c-71a7-4295-9bcc-0d2f7d440bbd)
17
+
18
+ ![english sample](https://raw.githubusercontent.com/white-seolpyo/seolpyo-mplchart/refs/heads/main/images/change%20format.png)
19
+
20
+ ![korean sample](https://github.com/white-seolpyo/seolpyo-mplchart/blob/main/images/sample%20kor.png?raw=true)
@@ -1,20 +1,20 @@
1
1
  [build-system]
2
2
  requires = [
3
3
  "setuptools >= 65.0",
4
- "matplotlib >= 3.9.2",
5
- "pandas >= 2.2.2",
4
+ "matplotlib >= 3.7.0",
5
+ "pandas >= 2.0.0",
6
6
  ]
7
7
  build-backend = "setuptools.build_meta"
8
8
 
9
9
  [project]
10
10
  name = "seolpyo-mplchart"
11
- version = "0.0.3"
11
+ version = "0.0.5"
12
12
  dependencies = [
13
- "matplotlib >= 3.9.2",
14
- "pandas >= 2.2.2",
13
+ "matplotlib >= 3.7.0",
14
+ "pandas >= 2.0.0",
15
15
  ]
16
16
  license = {text = "MIT License"}
17
- description = "Fast candlestick chart using Python.\nIncludes navigator, slider, navigation, and text information display functions"
17
+ description = "Fast candlestick chart using Python. Includes navigator, slider, navigation, and text information display functions"
18
18
  readme = "README.md"
19
19
  requires-python = ">= 3.11"
20
20
  authors = [
@@ -54,7 +54,7 @@ class DataMixin(Base):
54
54
  if k in _set_key: raise Exception(f'you can not set "self.{i}" value in {_set_key}.\nself.{i}={k!r}')
55
55
  if i != 'date':
56
56
  dtype = df[k].dtype
57
- if not isinstance(dtype, np.dtypes.Float64DType): raise TypeError(f'Data column type must be "float64".(excluding "date" column)\ndf[{k!r}].dtype={dtype!r}')
57
+ if not isinstance(dtype, (np.dtypes.Float64DType, np.dtypes.Int64DType, np.dtypes.Float32DType, np.dtypes.Int32DType)): raise TypeError(f'Data column type must be "float64" or "int64" or "float32" or "int32".(excluding "date" column)\ndf[{k!r}].dtype={dtype!r}')
58
58
 
59
59
  for i in self.list_ma: df[f'ma{i}'] = df[self.close].rolling(i).mean()
60
60
 
@@ -66,25 +66,25 @@ class DataMixin(Base):
66
66
  df['vleft'] = df['x'] - volumewidth_half
67
67
  df['vright'] = df['x'] + volumewidth_half
68
68
 
69
- df['top'] = np.where(df['open'] <= df['close'], df['close'], df['open'])
70
- df['top'] = np.where(df['close'] < df['open'], df['open'], df['close'])
71
- df['bottom'] = np.where(df['open'] <= df['close'], df['open'], df['close'])
72
- df['bottom'] = np.where(df['close'] < df['open'], df['close'], df['open'])
69
+ df['top'] = np.where(df[self.Open] <= df[self.close], df[self.close], df[self.Open])
70
+ df['top'] = np.where(df[self.close] < df[self.Open], df[self.Open], df[self.close])
71
+ df['bottom'] = np.where(df[self.Open] <= df[self.close], df[self.Open], df[self.close])
72
+ df['bottom'] = np.where(df[self.close] < df[self.Open], df[self.close], df[self.Open])
73
73
 
74
74
  # 양봉
75
75
  df.loc[:, ['facecolor', 'edgecolor']] = (self.color_up, self.color_up)
76
76
  if self.color_up != self.color_down:
77
77
  # 음봉
78
- df.loc[df['close'] < df['open'], ['facecolor', 'edgecolor']] = (self.color_down, self.color_down)
78
+ df.loc[df[self.close] < df[self.Open], ['facecolor', 'edgecolor']] = (self.color_down, self.color_down)
79
79
  if self.color_up != self.color_flat:
80
80
  # 보합
81
- df.loc[df['close'] == df['open'], ['facecolor', 'edgecolor']] = (self.color_flat, self.color_flat)
81
+ df.loc[df[self.close] == df[self.Open], ['facecolor', 'edgecolor']] = (self.color_flat, self.color_flat)
82
82
  if self.color_up != self.color_up_down:
83
83
  # 양봉(비우기)
84
- df.loc[(df['facecolor'] == self.color_up) & (df['close'] < df['close'].shift(1)), 'facecolor'] = self.color_up_down
84
+ df.loc[(df['facecolor'] == self.color_up) & (df[self.close] < df[self.close].shift(1)), 'facecolor'] = self.color_up_down
85
85
  if self.color_down != self.color_down_up:
86
86
  # 음봉(비우기)
87
- df.loc[(df['facecolor'] == self.color_down) & (df['close'].shift(1) < df['close']), ['facecolor']] = self.color_down_up
87
+ df.loc[(df['facecolor'] == self.color_down) & (df[self.close].shift(1) < df[self.close]), ['facecolor']] = self.color_down_up
88
88
 
89
89
  self.df = df
90
90
  return
@@ -329,7 +329,7 @@ class LimMixin(DrawMixin):
329
329
 
330
330
  class SimpleMixin(LimMixin):
331
331
  simpler = False
332
- limit_volume = 2_000
332
+ limit_volume = 1_500
333
333
 
334
334
  def __init__(self, *args, **kwargs):
335
335
  super().__init__(*args, **kwargs)
@@ -351,7 +351,7 @@ class SimpleMixin(LimMixin):
351
351
  seg = self.df[['x', self.high, self.low]].agg(get_wickline, axis=1)
352
352
  self.blitcandle.set_segments(seg)
353
353
  self.blitcandle.set_edgecolor(self.df['edgecolor'])
354
- self.priceline.set_verts([self.df[['x', self.close]].apply(tuple, axis=1).tolist()])
354
+ self.priceline.set_verts(pd.array([self.df[['x', self.close]].apply(tuple, axis=1).to_list()]))
355
355
 
356
356
  volmax = self.df[self.volume].max()
357
357
  l = self.df.__len__()
@@ -381,12 +381,20 @@ class SimpleMixin(LimMixin):
381
381
  self.ax_price.xaxis.draw(renderer)
382
382
  self.ax_price.yaxis.draw(renderer)
383
383
 
384
- if self.simpler: self.blitcandle.draw(renderer)
384
+ left, right = self._navcoordinate
385
+ Range = right - left
386
+ if self.simpler:
387
+ if Range < 1_000: self.blitcandle.draw(renderer)
388
+ else: self.priceline.draw(renderer)
385
389
  elif self.candle_on_ma:
386
390
  self.macollection.draw(renderer)
387
- self.candlecollection.draw(renderer)
391
+ if 2_500 < Range: self.priceline.draw(renderer)
392
+ elif 800 < Range: self.blitcandle.draw(renderer)
393
+ else: self.candlecollection.draw(renderer)
388
394
  else:
389
- self.candlecollection.draw(renderer)
395
+ if 2_500 < Range: self.priceline.draw(renderer)
396
+ elif 800 < Range: self.blitcandle.draw(renderer)
397
+ else: self.candlecollection.draw(renderer)
390
398
  self.macollection.draw(renderer)
391
399
 
392
400
  self.ax_volume.xaxis.draw(renderer)
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: seolpyo-mplchart
3
- Version: 0.0.3
4
- Summary: Fast candlestick chart using Python.
3
+ Version: 0.0.5
4
+ Summary: Fast candlestick chart using Python. Includes navigator, slider, navigation, and text information display functions
5
5
  Author-email: white-seolpyo <white-seolpyo@naver.com>
6
6
  License: MIT License
7
7
  Project-URL: Homepage, https://white.seolpyo.com/
@@ -22,8 +22,8 @@ Classifier: Programming Language :: Python :: 3.11
22
22
  Classifier: Programming Language :: Python :: 3.12
23
23
  Requires-Python: >=3.11
24
24
  Description-Content-Type: text/markdown
25
- Requires-Dist: matplotlib>=3.9.2
26
- Requires-Dist: pandas>=2.2.2
25
+ Requires-Dist: matplotlib>=3.7.0
26
+ Requires-Dist: pandas>=2.0.0
27
27
 
28
28
  # Donation
29
29
  Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
@@ -35,3 +35,13 @@ Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
35
35
  [English](https://white.seolpyo.com/entry/148/)
36
36
 
37
37
  [한글](https://white.seolpyo.com/entry/147/)
38
+
39
+
40
+ # Sample
41
+ ![sample gif](https://github.com/user-attachments/assets/f1732891-d458-4c2d-a6bf-a17a4c549af6)
42
+
43
+ ![tkinter sample gif](https://github.com/user-attachments/assets/b9bd451c-71a7-4295-9bcc-0d2f7d440bbd)
44
+
45
+ ![english sample](https://raw.githubusercontent.com/white-seolpyo/seolpyo-mplchart/refs/heads/main/images/change%20format.png)
46
+
47
+ ![korean sample](https://github.com/white-seolpyo/seolpyo-mplchart/blob/main/images/sample%20kor.png?raw=true)
@@ -0,0 +1,2 @@
1
+ matplotlib>=3.7.0
2
+ pandas>=2.0.0
@@ -1,10 +0,0 @@
1
- # Donation
2
- Bitcoin: 1MKCHW8smDZv5DFMiVkA5G3DeXcMn871ZX
3
-
4
- Ethereum: 0x1c5fb8a5e0b1153cd4116c91736bd16fabf83520
5
-
6
-
7
- # Document
8
- [English](https://white.seolpyo.com/entry/148/)
9
-
10
- [한글](https://white.seolpyo.com/entry/147/)
@@ -1,2 +0,0 @@
1
- matplotlib>=3.9.2
2
- pandas>=2.2.2