-
Notifications
You must be signed in to change notification settings - Fork 606
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
kwarg fontscale
to scale Font Size (convenient when using figscale
)
#38
Comments
At present there is no direct way to do this. You can try using a custom style and setting an appropriate rcParam, for example:
Let me know if that helps. |
I'm wondering if the (Although when I made a very large figure, although the fonts did not scale accordingly, I did not find in my use-case, and in my environment, that they were really small for the larger charts.) |
@DanielGoldfarb The custom style method you suggested worked very well. Thank you! And I think it would be very convenient if the font size could scale automatically. |
Firstly thanks for your work on mplfinance - i've only just discovered it and am loving its approach so far vs other libraries i've used. I wanted to ask about your solution above using rcParams. Are all original matplotlib rcParams available to be used here? I found a list on https://matplotlib.org/3.1.1/tutorials/introductory/customizing.html that i used to experiment and am not sure whether they are not supported by mplfinance or whether i am calling them incorrectly. For example i tried unsuccessful to alter your solution above to instead change the number format on the x-axis:
Lastly i would be keen to contribute to this package where my limited knowledge is able to. I have created a notebook of examples i have created so far whilst experimenting that i could add to your examples if interested. Otherwise please reach out in the future if there's anything simple you can delegate. Kind regards |
@cammclean182
Your question has highlighted the fact that I need to do a better job of documenting which parameters are explicitly controlled by I realize now that I need to document other "overrides" that mplfinance is routinely doing, for example formatting the DateTime axis labels. The ability to not display non-trading days requires that mplfinance explicitly control the DateTime formatting (and not rely on rcParams). The solution is this: we need to create a I would definitely be interested in seeing your examples. You can place them in a repository or gist, and either make it public or give me permission to collaborate so I can see them, or if you prefer email me at dgoldfarb.github@gmail.com Alternatively you can fork mplfinance, and stick your examples in the examples directory, or perhaps the examples/scratch_pad directory, where I can review them in your fork and let you know if we want to add them to this repository. (I also may ask you if I can use them in a talk at a Python conference. I have submitted a proposal to speak on mplfinance at three different Python conferences this year, and I would love to be able to show examples from other mplfinance users; not just my own). |
figscale
scale Font Size as well.
Although it can make sense to scale the Font size when scaling the Figure, two factors may be an issue:
Therefore I have decided to implement this as a new kwarg, |
figscale
scale Font Size as well.fontscale
to scale Font Size (convenient when using figscale
)
Is there a way to easily adjust font size for the charts? Thanks.
(When I increase
figscale
, font size does not increase proportionally. So labels are really small for larger charts.)The text was updated successfully, but these errors were encountered: