plot

Adjust geom_point size so large values are plotted, but do not appear larger in ggplot2?

谁说我不能喝 提交于 2021-02-07 19:42:11
问题 The issue I am having is that I would like the points above a certain threshold (=<25) to not produce points larger than the set scale. These larger points still need to be displayed, and cannot be excluded: d=data.frame(y=c(1,2,6,4,4,6,7,8), x=c(8,4,7,5,4,9,2,3), coverage=c(0,6,9,88,25,22,17,100), col=c(0,.25,.50,.76,.80,1.00,.11,.34) ) ggplot() + scale_size(range = c(0, 13), breaks = c(0, 5, 10, 20, 25), labels = c("0", "5", "10", "20", "25+"), guide = "legend" ) + geom_point(data = d,

Adjust geom_point size so large values are plotted, but do not appear larger in ggplot2?

爷,独闯天下 提交于 2021-02-07 19:42:08
问题 The issue I am having is that I would like the points above a certain threshold (=<25) to not produce points larger than the set scale. These larger points still need to be displayed, and cannot be excluded: d=data.frame(y=c(1,2,6,4,4,6,7,8), x=c(8,4,7,5,4,9,2,3), coverage=c(0,6,9,88,25,22,17,100), col=c(0,.25,.50,.76,.80,1.00,.11,.34) ) ggplot() + scale_size(range = c(0, 13), breaks = c(0, 5, 10, 20, 25), labels = c("0", "5", "10", "20", "25+"), guide = "legend" ) + geom_point(data = d,

Adjust geom_point size so large values are plotted, but do not appear larger in ggplot2?

老子叫甜甜 提交于 2021-02-07 19:42:00
问题 The issue I am having is that I would like the points above a certain threshold (=<25) to not produce points larger than the set scale. These larger points still need to be displayed, and cannot be excluded: d=data.frame(y=c(1,2,6,4,4,6,7,8), x=c(8,4,7,5,4,9,2,3), coverage=c(0,6,9,88,25,22,17,100), col=c(0,.25,.50,.76,.80,1.00,.11,.34) ) ggplot() + scale_size(range = c(0, 13), breaks = c(0, 5, 10, 20, 25), labels = c("0", "5", "10", "20", "25+"), guide = "legend" ) + geom_point(data = d,

How can one set the size of an igraph plot?

。_饼干妹妹 提交于 2021-02-07 18:26:30
问题 I'm currently plotting my graphs like this: ig.plot(graph, target=file, vertex_color=membership, vertex_label=[index for index, value in enumerate(graph.vs)], vertex_frame_width=0, palette=ig.ClusterColoringPalette(len(set(membership)) + 3)) The plot is output to a PDF file on a single page. It looks decent but the nodes are too crowded. Is there a way to pull the nodes apart so that I can actually see all the edges? I was thinking of increasing the size of the plot but I don't know how to do

both a top and a bottom axis in pylab (e.g. w/ different units) (or left and right)

我们两清 提交于 2021-02-07 14:23:30
问题 I'm trying to make a plot with pylab/matplotlib, and I have two different sets of units for the x axis. So what I would like the plot to have is two axis with different ticks, one on the top and one on the bottom. (E.g. one with miles and one with km or so.) Something like the graph below (but than I would like multiple X axes, but that doesn't really matter.) Anyone an idea whether this is possible with pylab? 回答1: This might be a little late but see if something like this would help: http:/

both a top and a bottom axis in pylab (e.g. w/ different units) (or left and right)

独自空忆成欢 提交于 2021-02-07 14:22:20
问题 I'm trying to make a plot with pylab/matplotlib, and I have two different sets of units for the x axis. So what I would like the plot to have is two axis with different ticks, one on the top and one on the bottom. (E.g. one with miles and one with km or so.) Something like the graph below (but than I would like multiple X axes, but that doesn't really matter.) Anyone an idea whether this is possible with pylab? 回答1: This might be a little late but see if something like this would help: http:/

R pdf set margin

淺唱寂寞╮ 提交于 2021-02-07 13:16:42
问题 I am trying to set the figure margin for a pdf generated with R. Using mar, I can reduce the plot margins. However the resulted plot is still a square in the middle of the page instead of using all the space. How can I change that? pdf(file = "test.pdf", paper="a4r") par(mar=c(0,0,0,0)+0.1) plot(1:10,1:10) dev.off() Thank you! 回答1: Within pdf(), change the width and height arguments (https://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/pdf.html). The default values are 7 and 7, which

interactive scatter plot in bokeh with hover tool

依然范特西╮ 提交于 2021-02-07 12:52:27
问题 I'm trying to make a an interactive plots with bokeh and the hover tool. More precisely, I'm trying to make a plot like the one I made in seaborn but I'd like it to be more interactive, meaning : I'd like people to see the income level when they hover over one point. I'd like the plot to stay scattered like that such thas each point is an individual point, letting people hover over them in the process. I'd like to pick the colors,to divide between different levels of income. How would I do

What is the difference between importing matplotlib and matplotlib.pyplot?

别等时光非礼了梦想. 提交于 2021-02-07 12:18:31
问题 I'm still fairly new to python and am wondering if the x.y statement means y is a submodule of x? And if so, doesn't the command: import matplotlib.pyplot as plt only import this particular submodule and nothing else? I had to do this in order to get access to the hist function. How does that affect the modules normally imported when calling import matplotlib as plt ? Can I get all the modules in matplotlib together under the plt name? I'm aware that this question is related to what is the

What is the difference between importing matplotlib and matplotlib.pyplot?

天大地大妈咪最大 提交于 2021-02-07 12:17:07
问题 I'm still fairly new to python and am wondering if the x.y statement means y is a submodule of x? And if so, doesn't the command: import matplotlib.pyplot as plt only import this particular submodule and nothing else? I had to do this in order to get access to the hist function. How does that affect the modules normally imported when calling import matplotlib as plt ? Can I get all the modules in matplotlib together under the plt name? I'm aware that this question is related to what is the