Skip to main content

Questions tagged [matplotlib]

Matplotlib is a plotting library for Python which may be used interactively or embedded in stand-alone GUIs. Its compact "pyplot" interface is similar to the plotting functions of MATLAB®.

Filter by
Sorted by
Tagged with
0 votes
1 answer
3k views

Hello folks, I am trying to plot three variables in a single XY plot. I am having a problem setting the x-axis limit which is for time. I tried setting limits using x_limit but getting ...
Debashis Paul's user avatar
1 vote
1 answer
5k views

I am running logistic regression on iris dataset. I computed thetas and this is how I draw a decision boundary line. ...
Dmarm's user avatar
  • 13
1 vote
1 answer
790 views

Hello folks, Recently while going through a research paper I happened to come across a plot showing the hurricane track(figure attached). Can anyone say how it is plotted or anyone has ...
Debashis Paul's user avatar
3 votes
1 answer
135 views

The following code ...
E199504's user avatar
  • 607
0 votes
1 answer
569 views

I have the following three sentences, extracted from a dataframe. I would like to check the similarity and create clusters based on their level of similarity. ...
Math's user avatar
  • 161
0 votes
1 answer
731 views

Hello folks, I am trying to plot a grouped bar plot of two variables with varying lengths, which means the x and y length of both the variables are different. The format of the data is ...
Debashis Paul's user avatar
0 votes
1 answer
705 views

When I plot my data to see its distribution via Swarmplot, these two vertical lines that seems to even overlap occur in the figure. It seems to occur even around values that are not that dense, such ...
meliksahturker's user avatar
-1 votes
1 answer
3k views

While plotting the bar graph for number of attempt on x-aixs and time-taken on y-axis as per below code, getting Value error.Trace of error is included below. ...
Monil's user avatar
  • 1
0 votes
1 answer
3k views

I am trying to change the scale of the x_axis for a plot. The default is generating divisions of 20 units (0-20-40-60-80-100-120). I tried changing to log, but then I get 0-10-100, which helps ...
MyName's user avatar
  • 137
1 vote
1 answer
58 views

So for some weird reason I can't manage to fix the plotting issue Any suggestions? ...
Omerlewitz's user avatar
1 vote
0 answers
1k views

When graphing with matplotlib I get this 4 histograms model: 4 Histograms Using Seaborn I am getting the exact graph I need but I cannot replicate it to get 4 at a time: I want to get 4 of the ...
The Dan's user avatar
  • 221
1 vote
0 answers
402 views

I have successfully matched 2 images using bf.Match and drawn matches as well. Now, I am trying to match multiple images from 2 different directories. For this, I am using 2 different array to store ...
saurav.rox's user avatar
1 vote
1 answer
5k views

I wrote a simple Stock Prediction Algorithm and got the predicted value. Then, I wanted to plot the relation between Adjusted close price and predicted value, but got the ...
dsapprentice's user avatar
0 votes
1 answer
507 views

I am a newbie to data science. I have a very basic understanding of Seaborn. My understanding is that it is used to plot grids. That said, I intend to have a better understanding of 'FacetGrid' and ...
Bipin's user avatar
  • 213
0 votes
1 answer
132 views

My picture looks like this. It shows some percent variation but, due to fluctuations, curves are not very smooth at all. I would like to draw a smoother image, without altering too much the data (it ...
user's user avatar
  • 2,043
13 votes
3 answers
3k views

I spent the past year learning Python. As a person who thought coding was impossible to learn for those outside of the CS/IT sphere, I was obviously gobsmacked by the power of a few lines of Python ...
Uralan's user avatar
  • 143
1 vote
0 answers
388 views

The code below (I found from googling) does the trick in terms of outcome. What I need to work out is the formula for this, so for any Y point we can get corresponding X. This is part of a larger ...
Peter Verster's user avatar
0 votes
1 answer
14k views

I am trying to save my heat map in png format using the below code, but the labels are getting trimmed when I am saving the heatmap. Please help to keep the labels inside the figure. ...
Shivam Sharma's user avatar
2 votes
0 answers
3k views

I'm trying to realize a plot similar to the one in the following figure: I started from the code contained in the answer here: https://stackoverflow.com/questions/34099518/plotting-a-series-of-2d-...
254's user avatar
  • 21
3 votes
1 answer
845 views

I have generated 3 parameters along with the cost function. I have the $\theta$ lists and the cost list of 100 values from the 100 iterations. I would like to plot the last 2 parameters against cost ...
m2rik's user avatar
  • 321
0 votes
1 answer
5k views

how would I plot the data below with the x axis as Year & Month? Each Year-month combination has a unique monthly count (Y). I am unsure how to proceed, given than they are in different columns, ...
wertyu777's user avatar
-1 votes
1 answer
288 views

I know what "hue" does a little I'm studying kaggle and the image is about bike sharing demand analysis What I want to know is shouldn't the second images's sum of each point's y axis be the first ...
흐음흐음's user avatar
0 votes
1 answer
4k views

I have a small piece of code that print values gotten from a csv file into a histogram. This is all done using matplotlib library ...
E199504's user avatar
  • 607
2 votes
1 answer
9k views

I am really new to the world of matplotlib graphing as well as using those graphs to understand data. I have written a simple python code where I read a .csv file ...
E199504's user avatar
  • 607
3 votes
1 answer
541 views

I was trying to plot by using the following code ...
Pradeep Singh's user avatar
2 votes
1 answer
4k views

I'm running through a tutorial to understand the histogram plotting. Given the seaborn tips dataset, by running the sns.distplot(tips.tip); function the following ...
Andrea Moro's user avatar
2 votes
2 answers
272 views

I searched to find the answer but I don´t find something with Grid Search. I create a random forest and gradient boosting regressor with grid search. Now I want to make a visualization to see if the ...
ml_learner's user avatar
1 vote
1 answer
1k views

I'm using sklearn.model_selection.learning_curve for 5 fold training of data. The code is as given below. ...
Eswar's user avatar
  • 163
1 vote
0 answers
213 views

I have been trying my best to plot this type of feature distribution plot using Python. I looked for what they are called to replicate the plot, but couldn't find the name of it? The Reference of the ...
Pujan Paudel's user avatar
0 votes
1 answer
10k views

I have the following confusion matrix: I would like to change the format of the numbers that, when they exceed the value 99, appear in scientific format. I would like them to appear in a standard ...
scd's user avatar
  • 113
1 vote
1 answer
4k views

I am trying to plot time series data by accessing the SQLite database. I successfully connect the database by coding the below script,however, i couldn't figure out how to plot the time series data ...
Muhammad Ali's user avatar
  • 2,539
2 votes
1 answer
5k views

I am attempting to plot the expected diffraction pattern from a sharp razor which has a formula of: $$ I(p) = \frac 14 \delta^2(p) + \frac {1}{4\pi^2p^2}$$ where $p = \frac {\sin\theta}{\lambda}$ I ...
ZacharyC's user avatar
  • 121
-3 votes
1 answer
97 views

Question Please show me Python programming codes that shows graphs using the list method. Moreover, I want to know how to change graph lines to "-" or "*". Thank you for your answer in advance. <...
koji's user avatar
  • 101
4 votes
2 answers
3k views

I have a data set of around 3M row. I has only 2 category (category- 2:1 ratio). Now i want to visualize(scatter plot) it's distribution to understand can the data linearly separable or not(In order ...
Taimur Islam's user avatar
2 votes
0 answers
41 views

I am new to Python and using Jupyter notebook. Following is the summation equation that I have: $$y(t) = \sum_{i=1}^{t-1} a_{i}y(t-i)$$ How can I plot between variables y and t by formulating this ...
Ak001's user avatar
  • 21
1 vote
1 answer
311 views

I want to plot multiple plots. The data is stored in a pandas dataframe and each row should be a seperate plot. Each row has an ID (ZRD_ID) which doenst matter and a date (TAG) and 24 values to be ...
CRoNiC's user avatar
  • 147
3 votes
1 answer
4k views

Iam pretty new to the whole topic so please dont be harsh. I know these may be simple questions but everybody has to start somewhere ^^ So I created (or more copied) my first little Model which ...
G.M's user avatar
  • 181
3 votes
0 answers
503 views

I'm trying to plot 6 selected pair subplots with the combination of facetgrid of seaborn and scatter plot from matplotlib. I'm getting plot, but subplots remains empty whereas facetgrid gets plotted ...
Shadab Hussain's user avatar
0 votes
1 answer
485 views

Wondering if anyone can help me understand why python altair chart is not printing... I’m only seeing this when I run the code: It literally isn’t outputting anything. This is what my chart looks ...
standarduser's user avatar
2 votes
2 answers
16k views

When plotting a Pie chart from a dictionary using Python's matplotlib, I get some classes that are too mashed together because of their small size. Is there a way to group the smallest values together ...
Mouad Alami's user avatar
3 votes
1 answer
702 views

The given below code is not working now(earlier it was working) to put the column names on the diagonal of Seaborn PairGrid. ...
Girish Kumar Chandora's user avatar
0 votes
1 answer
980 views

I want to rotate the below curve to 45 degree and then find the minimum point. For this, I have tried with below code: ...
Sajjad Manal's user avatar
0 votes
1 answer
559 views

I have a heatmap image (correlation between all matrix columns) and I'm straggling to preform all the changes below within the same image: bar colors should be symmetric around zero (e.g., correlation ...
Serendipity's user avatar
4 votes
1 answer
20k views

I am trying to output a complex facet grid plot in the format of the following image: But the problem is that I don't want the edge color of the markers to be white, I want it to be the face color. ...
Russell Gould's user avatar
9 votes
3 answers
12k views

I am computing a distance metric on my data. The result is then being sorted in ascending order. The samples having distance more than a specific threshold are to be marked as outliers and will be ...
Faiz Kidwai's user avatar
-2 votes
1 answer
230 views

I got the nice plot but I want to export the data of x and y in column to excel sheet ...
Manish Kumar's user avatar
1 vote
1 answer
3k views

How can I change the legend as we can see now the legend has some cluster numbers missing. How can I adjust the legend so that it can show all the cluster numbers (such as Cluster 1, Cluster 2 etc, no ...
Cecilia's user avatar
  • 183
3 votes
2 answers
2k views

What do I need to change so that ax1 uses the same width for bars as ax2? ...
user134068's user avatar
2 votes
0 answers
418 views

I am using the SVM in scikit-learn library for doing multiclass classification. I am wondering why these regions (decision boundaries) are overlapping (as seen in the picture below)? Could someone ...
Prospero's user avatar
1 vote
1 answer
132 views

I'm finding a quicker method to export plots ...
HELO's user avatar
  • 11