scatter-plot

How to create a scatter plot with two colors per dot?

谁说胖子不能爱 提交于 2020-06-27 18:00:13
问题 I'm trying to plot both the ground-truth and my classification simultaneously in matplotlib. Currently, I only plot the groud-truth, after applying tsne on the feature space and adding the edges using the following code from matplotlib.collections import LineCollection cols=['rgbkm'[lbl] for lbl in list(data.y.cpu().numpy() - 1)] lc = LineCollection(X_embedded[out_dict['edges']],linewidth=0.05) fig = plt.figure() plt.gca().add_collection(lc) plt.xlim(X_embedded[:,0].min(), X_embedded[:,0].max

R/ggplot2: Collapse or remove segment of y-axis from scatter-plot

我怕爱的太早我们不能终老 提交于 2020-06-22 09:17:42
问题 I'm trying to make a scatter plot in R with ggplot2, where the middle of the y-axis is collapsed or removed, because there is no data there. I did it in photoshop below, but is there a way to create a similar plot with ggplot? This is the data with a continuous scale: But I'm trying to make something like this: Here is the code: ggplot(data=distance_data) + geom_point( aes( x = mdistance, y = maxZ, shape = factor(subj), color = factor(side), size = (cSA) ) ) + scale_size_continuous(range = c

R/ggplot2: Collapse or remove segment of y-axis from scatter-plot

扶醉桌前 提交于 2020-06-22 09:17:35
问题 I'm trying to make a scatter plot in R with ggplot2, where the middle of the y-axis is collapsed or removed, because there is no data there. I did it in photoshop below, but is there a way to create a similar plot with ggplot? This is the data with a continuous scale: But I'm trying to make something like this: Here is the code: ggplot(data=distance_data) + geom_point( aes( x = mdistance, y = maxZ, shape = factor(subj), color = factor(side), size = (cSA) ) ) + scale_size_continuous(range = c

R/ggplot2: Collapse or remove segment of y-axis from scatter-plot

天涯浪子 提交于 2020-06-22 09:16:13
问题 I'm trying to make a scatter plot in R with ggplot2, where the middle of the y-axis is collapsed or removed, because there is no data there. I did it in photoshop below, but is there a way to create a similar plot with ggplot? This is the data with a continuous scale: But I'm trying to make something like this: Here is the code: ggplot(data=distance_data) + geom_point( aes( x = mdistance, y = maxZ, shape = factor(subj), color = factor(side), size = (cSA) ) ) + scale_size_continuous(range = c

How to change point size in Scatter Chart?

谁说我不能喝 提交于 2020-06-12 20:32:59
问题 I have this ScatterChart made in JavaFX: How can I set the data points size? I found that it should be done in CSS, but even having the docs, I still cannot figure it out. 回答1: Use .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } If you need this to apply just to a specific chart, give the chart an id and use the id in the CSS file: chart.setId("bifurcation-diagram"); #bifurcation-diagram .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } SSCCE: import

How to change point size in Scatter Chart?

↘锁芯ラ 提交于 2020-06-12 20:32:35
问题 I have this ScatterChart made in JavaFX: How can I set the data points size? I found that it should be done in CSS, but even having the docs, I still cannot figure it out. 回答1: Use .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } If you need this to apply just to a specific chart, give the chart an id and use the id in the CSS file: chart.setId("bifurcation-diagram"); #bifurcation-diagram .chart-symbol { -fx-background-radius: 10px ; -fx-padding: 10px ; } SSCCE: import