matplotlib Questions
2
Solved
I have built a dashboard in streamlit where you can select a client_ID and have SHAP plots displayed (Waterfall and Force plot) to interpret the prediction of credit default for this client.
I also...
Maymaya asked 27/8, 2021 at 9:2
2
Solved
How do I make the horizontal axis pass through the origin?
import numpy as np
import matplotlib.pyplot as plt
rateList=[0,0.08,.1,.12,.15,.175,.225,.25,.275,.3,.325,.35]
list1=[-316.8,-424,-2.8,...
Amberlyamberoid asked 17/5, 2017 at 5:30
2
Solved
I have a script that creates png images from log data. It works fine on a production machine, but now spits errors on a new box while processing this line:
fig, ax = plt.subplots(1,1, figsize=(20...
Footle asked 23/4, 2013 at 9:30
3
Solved
I want to add a 2nd axes at the top right corner of a 1st axes. After googling, I found two ways to do things like this: fig.add_axes(), and mpl_toolkits.axes_grid.inset_locator.inset_axes. But the...
Parceling asked 6/8, 2017 at 0:35
3
Solved
I have the following data set:
In[55]: usdbrl
Out[56]:
Date Price Open High Low Change STD
0 2016-03-18 3.6128 3.6241 3.6731 3.6051 -0.31 0.069592
1 2016-03-17 3.6241 3.7410 3.7449 3.6020 -3.16 0...
Phytogenesis asked 8/4, 2016 at 17:17
3
Solved
I have a collection of measured tree diameters and am trying to plot a histogram with a kernel density estimation superimposed on top in python. The seaborn module lets me do this quite simply but ...
Furrier asked 16/2, 2014 at 10:18
1
Solved
I have a python script that provides a customized filter for zooming with matplotlib, to be used within a GUI. In particular, I have different subplots, and I would need to update ONLY the view of ...
Anfractuous asked 8/2, 2020 at 18:0
4
Solved
I want to be able to see lines (and points) that are ON THE 3D SURFACE on top of the surface (second image), not behind (first image).
This is my 3D function:
def f(x, y):
return np.sin(2*x) * ...
Hammonds asked 31/3, 2018 at 9:43
8
When making a plot, I used both Jupyter Notebook and Pycharm with the same set of code and packages. The code is:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt # as in P...
Sidon asked 24/5, 2017 at 4:40
4
I posted a question a while ago asking about Tkinter backends and subsequently forgot about it but I've since realised that I'm using the pyqt backend. Is there a fix for that?
Original Question:...
Leclerc asked 31/8, 2016 at 10:39
2
Solved
I'm attempting to create a faceted plot using seaborn in python, but I'm having issues with a number of things, one thing being rotating the x-axis labels.
I am currently attempting to use the fol...
Occident asked 5/2, 2020 at 13:55
3
Solved
I am trying to create a stacked barplot in seaborn with my dataframe.
I have first generated a crosstab table in pandas like so:
pd.crosstab(df['Period'], df['Mark'])
which returns:
Mark False Tr...
Hexapod asked 21/4, 2017 at 14:0
2
the issue: running Python's matplotib from a Windows virtual environment as reported & discussed Github ticket 93 and a relevant suggested fix here.
Code (myp.py):
import matplotlib.pyplot a...
Ashmore asked 19/2, 2016 at 19:30
3
I've run this code many times but now it's failing. Matplotlib won't work for any example, even the most trivial. This is the error I'm getting, but I'm not sure what to make of it. I know this is ...
Cockfight asked 27/2, 2022 at 20:42
3
Solved
I want to create a figure with two y-axes and add multiple curves to each of those axes at different points in my code (from different functions).
In a first function, I create a figure:
import ...
Kinslow asked 8/3, 2017 at 14:53
2
Solved
This is similar to Matlab: Combine the legends of shaded error and solid line mean, except for Matplotlib. Example code:
import numpy as np
import matplotlib.pyplot as plt
x = np.array([0,1])
y =...
Freeholder asked 6/10, 2014 at 13:48
7
Solved
Using Windows 10, anaconda as a package manager. I have a base environment running python 3.7 where matplotlib works fine. When I create a new environment and install both keras and matplotlib, I s...
Arlindaarline asked 24/10, 2018 at 23:35
5
Solved
Using custom fonts in matplotlib locally involves storing the .ttfs in the matplotlib/mpl-data/fonts/ttf/ folder, then calling mpl.font_manager._rebuild(), then setting mpl.rcParams['font.sans-seri...
Skirting asked 12/8, 2018 at 16:52
1
Solved
I was trying to follow an example outlined here https://stackoverflow.com/a/61973946
The code, after small adjustments looks like this:
def pos_image(x, y, pays, haut):
pays = countries.get(pays)....
Isahella asked 26/7, 2024 at 10:40
19
Whenever I am trying to compile the following code to get a line graph shows some errors. But I don't know how to fix it. Here is my code :
import plotly.plotly as py
import plotly.graph_objs as go...
Arrange asked 1/3, 2017 at 1:45
3
Solved
I would like to draw a bar in matplotlib with white as fill color, red as hatch color and black as edge color. However, it looks like the edge color changes also the color of hatch. So, I am not ab...
Chateau asked 3/7, 2016 at 10:20
4
Solved
By default jupyter notebook inline plots are displayed as png, e.g.:
import matplotlib.pyplot as plt
%matplotlib inline
plt.plot()
How can you configure jupyter notebooks to display matplotlib i...
Meill asked 14/4, 2016 at 11:52
3
Solved
I have the following little function:
def plotresults(freqs,power,prob,title,sigP):
pl.suptitle(title)
ax1 = pl.subplot(2,1,1)
ax1.axhline(y=sigP, color='r', ls='--',label='p=0.05')
pl.plot(fr...
Finish asked 11/8, 2015 at 19:35
3
Solved
I have set
import matplotlib as mpl
AXES_COLOR = '#333333'
mpl.rc('axes', edgecolor=AXES_COLOR, labelcolor=AXES_COLOR, grid=True)
mpl.rc('xtick', color=AXES_COLOR)
mpl.rc('ytick', color=AXES_COLOR...
Sarge asked 9/2, 2012 at 17:14
2
First of all, I am working on the Pycharm debug console and want to put a caption under my diagram. According to this answer this can be achieved by:
plt.plot([2,5,1,2]
fig = plt.figure()
fig.text...
Personality asked 14/3, 2018 at 18:7
1 Next >
© 2022 - 2025 — McMap. All rights reserved.