Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Help - plotting behavior different on Quantopian versus Jupyter

I am new to Quantopian.
I would like to plot Categorical Variables on the x-axis and numerical variables on the Y axis in a bar chart, however matplotlib is trying to force these string Categorical Variables to floats, but according to the matplotlib docs this should not happen.

https://matplotlib.org/3.2.1/gallery/lines_bars_and_markers/categorical_variables.html

I tried the code in the attached notebook in a normal Jupyter notebook and every plot worked fine. What is it about Quantopian that is causing this error?

2 responses

The version of Matplotlib used on Quantopian is 1.5.1. The docs you are referencing are for version 3.2.1. Take a look at the 1.5.1 docs (https://matplotlib.org/1.5.1/). There is probably a difference in syntax.

Good luck.

Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Thanks Dan. There was a difference in syntax between the two versions.