I have the following script to ultimately plot a 4 by 2 subplot:
files = getAllFiles('preliminaries');
n = size(files);
cases = cell(1, n);
m = cell(1, n);
for i = 1:1:n
S = load(files{i});
cases{i} = retransmission_distribution(S);
c = size(cases{i});
m{1,i} = cell(1, c(2));
%figure(i);
str_size = size(fil...
Is it possible to make a plot in matlab that does not actually take the logs of the values? I'm plotting wide ranges of values and when I try to make a log plot of them, those below 1 become negative. I would just like it to plot the values on a log scale without taking their logs.
...
I feel like I should know this, but somehow I'm drawing a blank for the last 30 minutes...
How would one go plotting a plane in matlab or scipy from a normal vector and a point? I keep wanting to use the symbolic math solver, but I don't have the license for it currently... :\
Sorry if this is really basic, my brain just isn't working ...
I'm trying to draw a smooth curve in R. I have the following simple toy data:
> x
[1] 1 2 3 4 5 6 7 8 9 10
> y
[1] 2 4 6 8 7 12 14 16 18 20
Now when I plot it with a standard command it looks bumpy and edgy, of course:
plot(x,y, type='l', lwd=2, col='red')
How can I make the curve smooth so that the 3 edges are r...
This histogram is really ugly:
hist(rbinom(10000, 20000, 0.0001),freq=F,right=F)
I don't want spaces between my bars. I tried different breaks= methods but they all produce similar results. Any ideas?
I also want each bin value (or mean values )to be printed under the center of it's bar.
...
I have several questions to do with handling some data in R:
I am using this statement: detailsTable <- read.table(file=commandArgs()[6], header=TRUE, col.names=c("a", "b", "c", "d", "e")) and it seems that the table is not being loaded correctly... but if I specify the path of the file I am loading excplicitly then all goes well. What...
I am using R and I have two data frames: carrots and cucumbers. Each data frame has a single numeric column which lists the length of all measured carrots (total: 100k carrots) and cucumbers (total: 50k cucumbers).
I wish to plot two histogram - carrot length and cucumbers lengths - on the same plot. They overlap, so I guess I also need...
Say I have a binary file which has the following format: 4*sizeof(double), 4*sizeof(size_t), (Ny*Nx)*dizeof(double).
The first 4 doubles and the 4 size_ts are metainformation about the file. The rest is data I want to plot with gnuplot.
Right now I have to convert the file to another one without the header to plot using the command:
p...
I'd like to plot data x & y with errorbars, ebar, and its fit, yfitted, on a semilog plot. This doesn't seem to work:
figure;
hold on;
errorbar(x,y,ebar);
semilogy(x,yfitted);
Instead of semilog plot I get a linear plot. What should I be doing differently?
...
Trying to do an xy scatter plot with the z value being denoted by the color of the xy point.
Data:
1.1, 32.27, 19.4
1.2, 21.34, 18
1.4, 47.45, 19.4
R code:
inp <- scan("beps.txt",list(x=0,y=0,z=0))
plot(inp$x, inp$y,pch=".")
Creates a great scatter plot, but I would like the points to be colored by the Z value.
...
I need to incorporate some scientific plot function into a program written in Ruby with wxWidgets. What's my best solution? I know that
1) PLPlot has a widget for wxWigets, but I'm not aware of any ruby bindings.
2) Python works well PLPlot and wxWigets, but I rather not rewrite the whole thing in python again.
Any suggestion would be...
I am running to a problem where I have to plot one scatter (data points), the other one the best line fit(trend line) for those data points in one chart. The X axis is datetime format which I, myself, am chaning it into a double value with a base date. The plots get plotted well individually. However, I dont get good results when I combi...
This is a general question regarding pulling up a CP plot in a split
view controller. I have menu items pointing to individual view
controllers pre-loaded with everything core plot related. My question
is can anyone fill me in on a good way to present the graphs on the
right pane while still showing the left pane? The way that I h...
I use par(new=T) before each of my plots to add my plot to the same graph.
However, when I do that it superimposes the two plots and the axis values get overwritten over each other and look messed up.
How do I properly add plot to the same graph that also normalizes axis intervals based on the two plots?
...
In matplotlib, line plots color cycle automatically. These two line plots would have different colors.
axes.plot(x1, y)
axes.plot(x2, y)
However, bar plots don't. Both these data series will have blue bars.
axes.bar(x1, y)
axes.bar(x2, y)
How do I make bar plots cycle automatically across a predefined set of colors?
...
I want to plot a 2d rect (using the rectangle function is good enough for my needs), but with a linearly interpolated color, i.e at the bottom it should be red, at the top blue, and between the two there should be the linear interpolation of the two colors.
How can I do this?
...
Hi all,
I'm very very new to Matlab and I tried to attempt at making a simple iteration script.
Basically all I wanted to do was plot:
1*sin(x)
2*sin(x)
3*sin(x)
...
4*sin(x)
And this is the program that I wrote:
function test1
x=1:0.1:10;
for k=1:1:5;
y=k*sin(x);
plot(x,y);
end % /for-loop
end % /test1
However, it only pl...
I've got a GUI in MATLAB with a set of axes pre-placed. I'm using the location property of the legend to place it to the right hand side of the axes. However, by doing this the axes get re-scaled so that the axes+legend take up the original width of the axes. Is there any way to circumvent the re-size?
Example:
x=0:.1:10;
y=sin(x);
fi...
I need to plot a dome or half a sphere and be able to change the dimensions of the dome. I figured MATLAB would be my best choice.
any suggestions?
THanks
...
I have generated the following plot using the R code that follows it:
ggplot(lengths, aes(length, fill = library)) + geom_density(alpha = 0.2) + coord_cartesian(xlim = c(0, 60000))
Now I would like to make the plot a bit prettier:
Make the x-axis show length every
5000 units (instead of every 20000)
Add x-values on top of the thre...