Allow the user to choose which graph library to use #230
-
Hi folks, I was wondering if there was a way to choose which library PyRoll uses to plot graphs. Implicitly I know that pandas which is integrated into PyRoll uses matplotlib by default, but as soon as I downloaded plotly for other needs, it automatically decided to use it for its plots too. In pandas I have the possibility to use the following string ( |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Hello Stefano, Plotly actually has the unpleasant property of establishing itself as the primary plot function. However, you can change the preferred plotting application in PyRoll with this command:
So you can use either plotly or matplotlib Additionally you can use some styles for matplotlib:
|
Beta Was this translation helpful? Give feedback.
-
Hello Stefano, of course you always have to import the PyRoll Core first, then the string will also work, I thought that was clear. You always need the PyRoll core for all calculations. So, this is how it works completely:
...then the string works |
Beta Was this translation helpful? Give feedback.
Hello Stefano,
Plotly actually has the unpleasant property of establishing itself as the primary plot function. However, you can change the preferred plotting application in PyRoll with this command:
pr.PLOTTING_BACKEND = 'matplotlib'
So you can use either plotly or matplotlib
Additionally you can use some styles for matplotlib:
plt.style.use('dark_background')
plt.style.use('bmh')
plt.style.use('grayscale')
plt.style.use('ggplot')
plt.style.use(“_classic_test_patch”)
plt.style.use(“default”)
plt.style.use(“fivethirtyeight”)
plt.style.use(“classic”)