I’ve a x and y. Both are flattened 2D arrays. I’ve two similar arrays, one for determining the colour of datapoint, another for determining detection method (“transit” or “radial”), which is used for determining the marker shape. Since there can be only one type of marker in a scatterplot and I have two types of markers, I call the scatterplot
Tag: scatter-plot
TypeError when plotting multiple scatter graphs?
I am having an issue when trying to plot scatter graphs. I am using Tiingo Api to get stock data and have plotted 4 separate histograms for my data with no issue (code below) However when I run this code to try to do something similar with a scatter graph I get a TypeError: no numerical data to plot, although
How to plot scatter graph with SCATTER fill_between in Python?
I am a manufacturing engineer, very new to Python and Matplotlib. Currently, I am trying to plot a scatter time graph, where for every single record, I have the data (read from a sensor) and upper and lower limits for that data that will stop the tool if data is not between them. So for a simple set of data
How to scatter plot two concentric circles with Numpy and Matplotlib
I’m trying to recreate the following plot with Numpy and Matplotlib as part of a question, but I’m struggling to get the “random aspect” of the plot: I’ve already managed to create the two circles and plot them with this code: But I don’t know how to make them get this random scattering, like in the example image. I know
How to align the x position of the dots in seaborn scatterplot to a nested bar plot
I am trying to plot a scatter plot on top of a bar plot using sns.scatterplot() and df.plot(kind=’bar’); The figure turns out to be fine, but it would be even nicer if I can align each of the scatter points to its corresponding bar with an identical label. I have read the document on Rectangle of matplotlib.pyplot that it has
Creating scatterplot / regression line using python
I am stuck on this problem but cannot figure out why it isn’t working as intended. I have a text file with a bunch of x and y coordinates which I need to use to find the average of all x and y values in order to calculate the slope for my regression line. It seems like stamping the individual
Map with bubbles with radius on basis of counting
I have this easy script for creating bubbles on map, but I would like bubbles with radius on basis of intensity. I put an image with lat, lon and count. In finaly I put the map result, but there aren’t bubbles. Where I am wrong? dataset Answer The reason for the display seems to be that the default value for
How to change the number of size categories in seaborn scatterplot
I tried hard to look through all the documentation and examples but I am not able to figure it out. How do I change the number of categories = the number of size bubbles, and their boundaries in seaborn scatterplot? The sizes parameter doesn’t help here. It always gives me 6 of them regardless of what I try (here 8,
How to set amount of hue levels in seaborn?
With the following code, I can use seaborn’s scatterplot to plot data with certain colors assigned to data values. How can I set the amount of colors that get used in this example? (e.g. if I want to have only two colors used or more than the 6 shown in the example) Answer Seaborn’s scatterplot has a legend= keyword, which
Pandas data frame how to make a scatter plot for clustering a list of values into a set of groups
I have this pandas df with 2 columns and I want to create a plot that clusters the drugs into their target, so there will be 7 clusters (7 targets) , I am not sure how to do it.. This is the df: Answer You can plot scatterplot with seaborn like below: (Because you say in the comments of other