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
0answers
13 views

Matplotlib: Lines on Top of Bars, Legend on the Left, No Splines

I'm having trouble tweaking the graph below. Here's what the dataframe looks like: ...
1
vote
0answers
12 views

matplotlib survey data evaluation

I would need some help on how to display data properly from a survey, since I am relatively new to it I feel a little lost on how to work it the right way and was wondering if someone could give me ...
1
vote
0answers
21 views

Filter and plot values using matplotlib

In order to understand data a bit more, I want to plot one column from my csv file using matplotlib as a dotted graph This is how my my csv file looks like. I want to filter the csv with ...
1
vote
1answer
26 views

Seaborn distplot and KDE data confusion

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 ...
2
votes
2answers
75 views

How to plot number of Trees and OOBs score with Grid Search

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 ...
1
vote
1answer
16 views

Making sense of a accuracy plot for a 5 fold training using random forest

I'm using sklearn.model_selection.learning_curve for 5 fold training of data. The code is as given below. ...
0
votes
0answers
22 views

Data Visualization of Feature Distribution Plot

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 ...
0
votes
1answer
12 views

Change number format of confussion matrix

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 ...
0
votes
0answers
17 views

What types of variables are these? And what types of tests could I run?

So, I recently made a sheet of data collected from the 2010 Census on Cincinnati neighborhoods. The data is from demographics about the neighborhoods of the city such as median household income and ...
0
votes
0answers
9 views

Precision-Recall for CNN place recognition problem

Given 3450 query and 3450 reference images in a place recognition problem, I plot the ...
1
vote
1answer
96 views

How to plot time series data from SQLite database

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 ...
2
votes
0answers
234 views

Python: Plotting equation with the Dirac Delta function

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 ...
0
votes
0answers
20 views

regarding 3D scatterplot with line in Python or Matplotlib

In Matplotlib or other python library, how to generate the 3D scatter plot with line, shown as following? It seems that ...
0
votes
0answers
17 views

Plot line at X axis based on Values of Y axis - maplotlib/seaborn

I have made a dist plot and now I want to plot a line on the x-axis based on the value of the y-axis. ie. I want to plot a line at various maximas/peaks and also shade a portion of the x-axis between ...
0
votes
0answers
7 views

Retrieving range on axis based on the peak point in scatter plot

I have a scatter plot that shows data of products sold & sales for each store. As visible in the graph that there is spike in sales from 60-70. I need a way to extract this range. Since i need to ...
0
votes
0answers
35 views

IndexError: too many indices for array

Attempting to load a dataset and print out a prediction for each array, yet I keep getting an IndexError.... ...
0
votes
0answers
15 views

Calculating co-variance matrices and plotting the co-variance value

I have an excel file with 10 samples drawn from a two-dimensional normal distribution. There's 20 columns. Sample 1 would be column 1,2. Sample 2 = col 3,4 ect. I'm trying to plot 10 separate ...
-2
votes
1answer
33 views

Python : How to output graphs using lists method and how to change graph lines to “-” or “*” [closed]

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. <...
2
votes
2answers
119 views

Best way to visualize huge amount of data

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 ...
2
votes
0answers
15 views

How do I plot between 2 variables in a summation equation?

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 ...
0
votes
1answer
28 views

how to create multiple plot from a panda Dataframe

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 ...
3
votes
1answer
69 views

How to creat a plot for the accuracy of a model

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 ...
0
votes
0answers
14 views

Code line explanations: Visuals of LogRegression

Why do we use -1 and +1 in the following code? ...
2
votes
0answers
88 views

Plotting facetgrid in subplot for IRIS dataset

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 ...
0
votes
1answer
73 views

Why is my Python Altair chart printing a blank line?

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 ...
0
votes
1answer
444 views

Group small values in a pie chart

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 ...
1
vote
1answer
49 views

How to put the variable names of pandas data frame on Diagonal of Seaborn PairGrid?

The given below code is not working now(earlier it was working) to put the column names on the diagonal of Seaborn PairGrid. ...
-1
votes
1answer
42 views

How to rotate the plot and find minimum point?

I want to rotate the below curve to 45 degree and then find the minimum point. For this, I have tried with below code: ...
0
votes
1answer
95 views

Changes in the standard Heatmap plot - symmetric bar colors, show only diagonal values, and column names at x,y axis ticks

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., ...
0
votes
1answer
1k views

How do I change the marker edge color of a seaborn relplot?

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. ...
5
votes
1answer
537 views

In elbow curve how to find the point from where the curve starts to rise?

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 ...
-1
votes
1answer
39 views

Export frequency and group to excel sheet in column after plotting by matplotlib

I got the nice plot but I want to export the data of x and y in column to excel sheet ...
1
vote
1answer
178 views

How can I adjust the legend when visualizing clusters in two dimensions?

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 ...
1
vote
2answers
74 views

Pandas, make the bars of a bar graph have equal widths

What do I need to change so that ax1 uses the same width for bars as ax2? ...
2
votes
0answers
71 views

Why are the regions/decision boundaries overlapping with multi-class classification using SVM in sci-kit?

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 ...
1
vote
1answer
50 views

Exporting from matplotlib

I'm finding a quicker method to export plots ...
0
votes
0answers
13 views
1
vote
0answers
250 views

Matplotlib pyplot: How to plot multiple trends in different areas of the plot?

I am trying plot some trends using matplotlib.pyplot. The task is straightforward, but there is one detail I can't get right. I wish to plot a numpy.array called ...
0
votes
0answers
12 views

How to draw proper chart of distributional tree?

I am using python with matplotlib and need to visualize distribution percentage of sub-groups of an data set. imagine this tree: ...
1
vote
1answer
238 views

Seaborn subplots massive whitespace

I'm trying to plot three heatmaps in a vertical column using Seaborns subplot method. ...
0
votes
2answers
158 views

Place a marker on a plot

I want to place a Call Marker on a plot. Call should be "buy" whenever the smaller moving average (21) crosses over longer moving average (34) AND the Call should be "sell" whenever smaller moving ...
0
votes
0answers
132 views

Meaning of confidence interval in seaborn barplot

I'm working with titanic data.I'm using seaborn barplot to understand the data so what this line means?I know it's 95% confidence interval,but how to understand this graph some of the line is long ...
0
votes
1answer
138 views

Making Inference from a Correlation Heatmap

I have constructed a Heatmap of my dataset for visualization. I have searched on various sites regarding what can I infer from the heatmap and I am unable to get any clear understanding from them. I ...
2
votes
2answers
803 views
0
votes
2answers
21 views

How do I fix mis-rendered matplotlib?

How do I correct my data or format it so that it is presentable, and fix my graphs? Dataset is 345551 rows × 7 columns. I am using numpy, pandas, seaborn and matplot lib. It seems that my pricing ...
0
votes
0answers
13 views

Plotting the value change in regression CNN

I have trained my CNN on thousands of images with different hyperparameters, now I want to show the difference on the output for each individual image. I mean ...
0
votes
0answers
1k views

Jupyterlab Inline Interactive plot

I am trying to make my inline plots in jupyterlab interactive. So far, I have tried a suggestion as pointed out here, among others: https://stackoverflow.com/questions/50149562/jupyterlab-interactive-...
2
votes
1answer
94 views

Is there a way to put a separate line between clusters for k-Means Clustering?

k-Means Clustering is a method of vector quantization, originally from signal processing, that is popular for cluster analysis in data mining. here is a piece of code to perform a 2-d k-Means ...
4
votes
2answers
51 views

Which plot to use for data spanned on multiple years?

I've a dataset of - Number of accidents that happens in each state. The dataset spans from 2001 to 2014. Which plot should I use to represent the information - number of accidents in each state per ...
3
votes
1answer
302 views

Plotting Weibull distribution on Wind Speed

I have a 720 hourly set of wind speed and wind direction data and I want to fit the Weibull Distribution on it. After searching for some time, I wrote the following code in Python to get my ...