[Solved] How do I achieve a bubbleplot? [closed]

To achieve this you could use ggplot. Here an example: require(ggplot2) df <- data.frame(x = c(-2, -1.5, 1, 2, 3), y = c(-1, 0.8, 1, 1, 2), country = c(“SWI”, “FRA”, “US”, “UK”, “NL”), size = c(15,12,20,4,7)) ggplot(df, aes(x = x, y = y)) + geom_point(aes(size = size), pch=1) +geom_text(aes(label=country),hjust=-0.5, vjust=0) + xlim(c(-3,4)) + scale_size_continuous(range … Read more

[Solved] Plot a three variables function over the specified domain in MATLAB [closed]

its still a little unclear as to what you’re trying to accomplish. Is this what you’re trying to do?: x1=0.5:.01:1.6; x2=280:0.453:330; x3=-2.06:.0373:2.06; V = x1.^2+x2.^2+x3.^2+3.*x1.*x3-x2.*x3-4.*x2.*x1; subplot(3,1,1) plot(V,x1) subplot(3,1,2) plot(V,x2) subplot(3,1,3) plot(V,x3) 3 solved Plot a three variables function over the specified domain in MATLAB [closed]

[Solved] R-project Graphic plot [closed]

I think the two outputs below are ~pub-ready. The first uses base R and jitter, used to add some noise to data so that points with the very same coordinates appear on different positions. That’s a nice approach in such case (providing you mention the jittering as data are slightly modified). If you have many … Read more

[Solved] plot multiple lines in ggplot

I’ll make some fake data (I won’t try to transcribe yours) first: set.seed(2) x <- data.frame( Date = rep(Sys.Date() + 0:1, each = 24), # Year, Month, Day … are not used here Hour = rep(0:23, times = 2), Value = sample(1e2, size = 48, replace = TRUE) ) This is a straight-forward ggplot2 plot: … Read more

[Solved] R script : add a padding to the ymax of the plot with ggplot2

No code to generate your sample data was provided, so I used the code @akrun had used previously: y3 <- matrix(rnorm(5000), ncol = 5) library(tidyverse) as.data.frame(y3) %>% mutate(row = row_number()) %>% # add row to simplify next step pivot_longer(-row) %>% # reshape long ggplot(aes(value, color = name)) + # map x to value, color to … Read more

[Solved] Bubble plot of mine quakes [closed]

Edit: Updated to use more meaningful data. The original response is at the bottom. This map… … can be produced with the following code: library(ggplot2) library(maptools) # grab earthquake data [source: USGS Earthquake Hazards Program] url <- “http://comcat.cr.usgs.gov/fdsnws/event/1/query” querystring <- “starttime=2012-01-01T00:00:00Z” querystring <- paste(querystring,”minmagnitude=6″, sep=”&”) # magnitude >= 6 querystring <- paste(querystring,”mindepth=0″, sep=”&”) querystring <- … Read more