question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: Integrate colorize() in text(), indicator() etc.

See original GitHub issue

Hi!

1.Was playing with colorize on label. Maybe i should add some format options, right side just went away. or some issue with space calculations.

2.also is it possible to place label on right side?

import yfinance as yf
import plotext as plt

plt.date_form('d/m/Y')
start = plt.string_to_datetime('11/06/2022')
end = plt.string_to_datetime('10/10/2022')
data = yf.download('goog', start, end)
# data.reset_index(drop=True)
dates = plt.datetimes_to_string(data.index)
plt.xlim("10/06/2022", "15/10/2022")
h=plt.colorize(str(round(data['High'][-1],2)),'green')
l=plt.colorize(str(round(data['Low'][-1],2)),'red')
label='GOOG '+l+'|'+str(round(data['Close'][-1],2))+'|'+h
plt.candlestick(dates, data,label=label,yside = 2)
plt.hline(100,'red',yside=2)
plt.text(' 100 ',x='12/10/2022',y=100,background='red',color='black',yside=2)
plt.show()

image

image

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:17 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
piccolomocommented, Oct 16, 2022

Hi @ineteye,

no currently colorize() cannot be used inside indicator(). I did not follow the rest of the bug, could you please send some code and snapshot an perhaps explain it differently? Thanks

1reaction
piccolomocommented, Oct 11, 2022

ye it will work, but it will screw positioning! my recommendation is do not use colorize in xlabel, as i told you.

the extra color ansi codes will mess with positioning.

if you need extra number indicators, follow example, or add them to xlabel with no colors.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · piccolomo/plotext - GitHub
Feature Request : Integrate colorize() in text(), indicator() etc. ... ProTip! Type g p on any issue or pull request to go back...
Read more >
Make the color of the hidden conditional text indicator match ...
Currently, the color of the hidden conditional text indicator is orange. But why orange?why not something more useful?
Read more >
Programmatic Language Features - Visual Studio Code
These guidelines present the language features available in Visual Studio Code and explain the ... function onChange() { let uri = document.uri; check(uri....
Read more >
Bring back the "Community / Custom Indicator" Text Color
Before this new chart update the indicator list use to have all Community and custom made Indicators in “Blue ... Tradovate Feature Requests....
Read more >
Image Hotspots Tutorial | H5P
Next, there are Hotspot icon and Hotspot color option: You can choose from the list of Predefined icons or upload your custom icon:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found