I would like to create a Seaborn scatter-plot, using the following dataframe: In my graph A should be the x-variable and B the y-variable. Furthermore I would like to color based on column D. Finally, when C=’y’ the marker should be open-faced (no facecolor) and when C=’n’ the marker s…
Tag: scatter-plot
How to avoid overlapping text in a plotly scatter plot?
I am looking for a solution to avoid overlapping text in the text-labels. I create the image with plotly scatter. Maybe there is an automation here. Answer Unfortunately, there does not seem to be a direct way to do this. A little digging on the plotly community forum will show you that it has already been re…
Matplotlib: how to classify values/data in a scatter plot?
I’m trying to create a scatter plot that, on the graph, you can differentiate two things: By color. For example, if the value is negative the color is red and if the value is positive the color is blue. By marker size. For example, if the value it’s between -0.20 and 0 size is 100, if the value is…
How to add specific dots on a box plot created using pandas data frame?
I have a pandas data frame (df) which looks like following:enter image description here I was able to create a box plot and scatter plot separately from the given data frame using the following code: The results look like this: enter image description here I want to add the dots from the scatter plot which re…
Sort categorical x-axis in a seaborn scatter plot
I am trying to plot the top 30 percent values in a data frame using a seaborn scatter plot as shown below. The reproducible code for the same plot: Here, I want sort the x-axis in order = [‘virginica’,’setosa’,’versicolor’]. When I tried to use order as one of the parameter…
Sklearn logistic regression, plotting probability curve graph
I’m trying to create a logistic regression similar to the ISLR’s example, but using python instead But I keep getting the graph on the left, when I want the one on the right: Edit: plt.scatter(x,LogR.predict(x)) was my second, and also wrong guess. Answer you use predict(X) which gives out the pre…
Align matplotlib scatter marker left and or right
I am using the matplotlib scatterplot function to create the appearance of handles on vertical lines to delineate certain parts of a graph. However, in order to make them look correct, I need to be able to align the scatter plot marker to the left (for the left line / delineator) and / or right (for the right…
How to make a 3D scatter plot in matplotlib
I am currently have a nx3 matrix array. I want plot the three columns as three axis’s. How can I do that? I have googled and people suggested using Matlab, but I am really having a hard time with understanding it. I also need it be a scatter plot. Can someone teach me? Answer You can use matplotlib for …