I am trying to create a Candlestick chart using PySimpleGUI and display it in a Canvas. I am having trouble finding an example of how to do this. I have tried using Matplotlib and Plotly but have encountered errors. I would like to know if anyone has successfully created a Candlestick chart using PySimpleGUI Canvas and could share their code or point me in the right direction. Tried many ways with pysimplegui, none worked.
Related
I am currently working in a project where i need to display Enthalpy/Pressure diagram which look like this:
Diagram enthalpy/Pressure
I am doing it with matplotlib & Coolprop using this kind of code:code diagram
I want an interactive figure where i can see the values of all the points i draw just by passing my mouse on them.
I know that plotly allow this kind of thing, so my question is how can i convert my matplotlib figure into a plotly one or how can i change my code to use plotly instead of matplotlib ?
Thank you
i ran a code with this line
matplotlib.use("Agg")
i read about it and what i understood is that matplotlib will show my graphs in different gui.
then i tried to plot some graphs in a different code and got this error:
UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure. plt.show()
i read in a question here that i need to change the backend to 'TkAgg' using tkinter. and it worked but now it shows the graphs in a different window than im used to. how can i change it back to what it was?
p.s im very new to programming and sorry for my english.
I've been making an application that uses matplotlib to make a line graph, but the issue I've been having is that when I try and hover over the graph, it is a static image that I can pan around, but I'm unable to get the values on my graph when I hover my mouse. I'm not looking to make a scatter graph, but a line graph that annotates over the values when I hover my mouse over it. I understand that matplotlib graphs can be made interactive with Dash/Plotly, but the issue is that they only work on webapps, and I am looking for a way to make my mpl graph look more like a plotly one on a Tk GUI app. Any way that this is possible?
Haven't been able to find an example of tab layouts in Bokeh that I desire.
I have something that looks like the example: http://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#tab-panes
However, I'd like to have the plots be able to 'expand' with the screen, ie have something like sizing_mode = scale_width, scale_height or stretch_both. I've tried playing with the toy tabs example that I posted above but cannot seem to get the plots to change size or I get a Bokeh Error unsatisfiable constraints.
Anyone have luck on making a panel layout with full screen plots?
Is it possible to make the plotly legends draggable? Currently I have my legend positioned outside the graph. I want to move it inside the graph, which is covered in the documentation, but I want to be able to make it draggable.
There is no direct way to drag the legend on a Plotly chart as far as I know.
You could find a workround by creating your legend in a HTML canvas and binding the onclick() function for each legend item to the Plotly PostMessage API restyle task.
There's a live example of the PostMessage API here which you should be able to hack apart. Let me know how you get on, this sounds interesting!
You can set "editable": True in the plot config.
https://github.com/plotly/plotly.js/blob/master/src/plot_api/plot_config.js#L46-L54