scatter-plot

ggplot2 custom legend shapes

别说谁变了你拦得住时间么 提交于 2019-12-28 06:35:51
问题 When we have both shape and color legend in scatter plot, the shape of color legend is misleading: foo <- data.frame( length=runif(10), height=runif(10), group=as.factor(sample(3,10,rep=T)), quality=as.factor(sample(2,10,rep=T)) ) ggplot(foo, aes(x = length, y = height, color=group, shape=quality)) + geom_point(size=5) This will produce the plot below. As you see, the "circle" shape is reserved for the objects of quality==1 , however in the group legend, all 3 groups are presented in "circle"

iOS Scatter core plot with a gap

天大地大妈咪最大 提交于 2019-12-28 04:33:13
问题 How does one draw a scatter plot with a gap using core plot? I was using the core plot library. Everything is working fine but now I want to do a scatter plot with a gap at the beginning or in the middle of the dataline? Someone help me please? 回答1: Have the datasource return nil or [NSNull null] . For example, if the plot has five data points and you return nil for the x or y field at index 2, the plot will draw the points at indices 0 and 1 connected by a line and indices 3 and 4 connected

How to define fixed aspect-ratio for scatter-plot

倖福魔咒の 提交于 2019-12-28 02:49:10
问题 I am plotting correlation coefficients (values = 0.0:1.0) for two isotopes measured in each individual from two populations. I would like to have a fixed aspect-ratio for my scatter-plot so that the x- and y-axis are exactly the same size no matter the graphics device. Suggestions? This is my first plot in R, any comments on refinements to my code is appreciated? Finally, is it worth investing in learning the basic plotting techniques or should I jump right to ggplot2 or lattice? My plot

formatting all the markers for the hovering series in a HighCharts scatterplot

≯℡__Kan透↙ 提交于 2019-12-25 15:52:27
问题 I want to change the appearange of all the markers (not only the one pointed) when hovering the series, but the following code (http://jsfiddle.net/fw852fy9/4/) does not work properly. What's wrong? Highcharts.chart('container', { chart: { type: 'scatter' }, plotOptions: { series: { lineWidth:1, states: { hover: { lineWidthPlus: 2, marker: { enabled: true, radius:3, states: { hover: { fillColor:'#FF0000', lineColor:'#00FF00', lineWidth:3, radius:12 } } } } }, marker: { enabled: true, radius:3

How to draw trade line on Scatter Chart in android?

↘锁芯ラ 提交于 2019-12-25 02:22:17
问题 I am developing application which requires scatter chart. For scatter chart I am using Apache aChartEngine library to draw scatter chart but I needto draw Trade line also on that scatter chart. aChartEngine is not supports Trade line functionality.So anyone has Idea how to draw Trade line on scatter chart in android. Edit Here is my code. protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TrendLine t = new

How to add p values for Spearman correlation coefficients plotted using pairs in R

限于喜欢 提交于 2019-12-25 02:21:06
问题 I see that there is already code available to add Pearson correlation coefficients and p values to a scatterplot matrix. Now I would simply like to add Spearman correlation coefficients in the upper panels. Currently I can add Pearson correlation coefficients by calling upper.panel=panel.cor , as in the below. # the code for creating a scatterplot matrix pairs(mat, upper.panel=panel.cor) panel.cor is a function supplied in a previous Stack Overflow post~ # panel.cor, the code for calculating

how to fix scatter graph size fixed in core plot

Deadly 提交于 2019-12-25 01:46:39
问题 I'm using core plot scatter graph,but i'm not able to maintain size of the. For some values the graph works fine ,but for some values the size of the graph changes. Can i fix it using xRange ,if yes, how? please refer these images 1. 2 Why this is happening ? 回答1: plotSpace.xRange = [CPTPlotRange plotRangeWithLocation:CPTDecimalFromFloat(0) length:CPTDecimalFromFloat([[mXaxisArray valueForKeyPath:@"@max.floatValue"]floatValue])]; Added xRange to fix this issue 来源: https://stackoverflow.com

Controlling scatterhist Marker Transparency

走远了吗. 提交于 2019-12-25 01:16:49
问题 I need to control the transparency of the markers in the figure produced with the scatterhist command in MATLAB. The following post is helpful in handling the color of the histograms: Controlling scatterhist bar colors. How can the transparency of the markers be modified? How can I add a contour plot on top of the markers? 回答1: tl;dr : In MATLAB R2019a, scatterhist can do contours but it is difficult (yet possible) to add marker transparency, and scatterhistogram can easily do transparency

Scatter plot with groups

北战南征 提交于 2019-12-24 21:33:37
问题 Hi I want to do a scatterplot or point plot of different groups. I can get it work for individual plots but as ggplot2 need coordinates for the x-axes. thats were I already get into trouble. This is my structure: # A tibble: 2 x 33 gene_id gene N1 N2 N3 N4 N5 N6 N7 T1 T2 T3 T4 <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> 1 ENSMUSG000… RNS 198 182 206 183 177 194 193 173 191 167 200 2 ENSMUSG000… RNS2 199 198 216 252 273 159 164 159 162 151 199 # ... with 20

Purpose of 'ax' keyword in pandas scatter_matrix function

折月煮酒 提交于 2019-12-24 14:51:35
问题 I'm puzzled by the meaning of the ' ax ' keyword in the pandas scatter_matrix function: pd.scatter_matrix(frame, alpha=0.5, figsize=None, ax=None , grid=False, diagonal='hist', marker='.', density_kwds={}, hist_kwds={}, **kwds) The only clue given in the docstring for the ax keyword is too cryptic for me: ax : Matplotlib axis object I had a look in the pandas code for the scatter_matrix function, and the ax variable is incorporated in the following matplotlib subplots call: fig, axes = plt