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.

Screenshot of candlestick charts - [sorry can't understand the examples given]

See original GitHub issue

I am plotting candlestick charts from a dataframe but can’t save screenshots. Files are saving (as .png) but they are corrupted and can’t be viewed. The plot itself shows just fine and I have seen no errors until I tried to implement the screenshot part.

I have copied the save function from the documentation. Since it isn’t explicitly called, I’m assuming the .show() method checks for any function by the name of “save” and autoruns it.

fplt.candlestick_ochl(df[['open', 'close', 'high', 'low']])

def save():
        fplt.screenshot(open('screenshot2405-2.png', 'wb'))
        fplt.timer_callback(save, 0.5, single_shot=True) # wait some until we're rendered

fplt.show()

Running this in PyCharm, I get no error messages. But again, the store files are not viewable.

Maybe there is something different about screenshotting when using candlestick charts?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
highfestivacommented, May 28, 2022

fplt.create_plot('My Window', maximize=True)

1reaction
highfestivacommented, May 25, 2022

Place the close call inside the save method.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Candlestick Patterns DONT Work : 3 Reason Why - YouTube
Your browser can't play this video. Learn more. Switch camera.
Read more >
Understanding a Candlestick Chart - Investopedia
Learn how to read a candlestick chart, as well as spot candlestick patterns that aid in analyzing price direction and previous price movements....
Read more >
Encoding candlesticks as images for pattern classification ...
The second step uses the Convolutional Neural Network (CNN) with the GAF images to learn eight critical kinds of candlestick patterns. In this ......
Read more >
How to Read a Candlestick Chart - DailyFX
Learn how to read and interpret candlestick charts for day trading. Our guide explores top candlestick chart analysis strategies and tips.
Read more >
Candlestick Patterns - The Lazy Trader
What is candlestick trading? You are not going to be swapping candles with your neighbours. Candlesticks are a type of chart you use...
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