-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds a matlab like hold on
to plot on same axis
#5173
Conversation
@tehcoderer why you break mypy on me |
@DidierRLopes here is a fun script :)
|
This is going to be huge. A few comments below, If I do:
I get: 1/ I should be able to select my own legend otherwise they don't make much sense. This also solves issues when charts don't have a legend. 2/ I don't know which axis corresponds to each plot. The axes should be of the color of the plot it corresponds to 3/ The font on the left axis is smaller for some reason 4/ The title should be able to be customizable, so I can do things like "comparing revenues between tech companies" and similar 5/ The notion of command on the top right should be hidden since it doesn't make sense anymore with multiple ones being used. We need to have a more robust solution to handle edge cases, which will happen. If I run I suggest that we check whether an output has a timeseries as an index type. If not and cannot be converted into one, I suggest we raise a warning saying that the output is not a timeseries and therefore will not be added to the chart. |
bet'cha couldn't make it work like the
If it doesn't work with Something like,
I would vote for the argument name, |
Donezo. If a legend is not provided, then it will default to either the command location or wont show (in the case of the function not having a legend).
I couldnt figure out the spines, but I made the tick colors the same as the line color (except for the primary one, which is always white)
I dont see where we actually set the font size in our _views, so I adjusted it by hand to try to match a few functions. Will likely find some cases i appears different sizes
Donezo. hold off --title comparing revenues between tech companies
Donezo
As we said, there should be some level of user error. We are likely to see some weird things when we are dealing with date times that are either - wrong types (datetime vs string) or different frequencies etc. |
The actual underlying issue is that the candle is generated from Juans PlotlyTA class, which has no inheritance from the OpenBBFigure. The hold logic is in the OpenBBFigure. Since this relies on plotting on the same axes, figures that have subplots will fail (like ta or qa functions).
I could edit the warning to say
Breaks convention. If anything --same-axis but thats one more character. |
92d1942
to
c4f4706
Compare
Definitely was not juan telling me to do.
But this should be super helpful for scripts to avoid having to manually overlay.
There will be some growing pains with different types of charts (ta charts vs candles vs lines and pies etc)