Tag: plot

59 votes
13 answers
1.9K views
How to change legend title in ggplot

I have the following plot like below. It was created with this command: library(ggplot2) df <- data.fram

avatar
Boyd
0 1 0 9
asked 07 September, 2021
52 votes
2 answers
1.9K views
How to set limits for axes in ggplot2 R plots?

I plot the following: library(ggplot2) carrots <- data.frame(length = rnorm(500000, 10000, 10000)) cu

avatar
Roger
0 1 0 9
asked 07 September, 2021
57 votes
13 answers
1.9K views
Side-by-side plots with ggplot2

I would like to place two plots side by side using the ggplot2 package, i.e. do the equivalent of par(mfrow=c(

avatar
Omar
0 1 0 9
asked 07 September, 2021
57 votes
16 answers
2.3K views
Plot two graphs in same plot in R

I would like to plot y1 and y2 in the same plot. x <- seq(-2, 2, 0.05) y1 <- pnorm(x) y2 <- pnorm(x

avatar
Lynette
0 1 0 9
asked 07 September, 2021
62 votes
7 answers
2.4K views
How can we make xkcd style graphs?

Apparently, folk have figured out how to make xkcd style graphs in Mathematica and in LaTeX. Can we do it in R

avatar
Thurman
0 1 0 9
asked 07 September, 2021
47 votes
8 answers
776 views
Rotating and spacing axis labels in ggplot2

I have a plot where the x-axis is a factor whose labels are long. While probably not an ideal visualization,

avatar
Rufus
0 1 0 9
asked 07 September, 2021
63 votes
4 answers
679 views
How to change the window title of a MATLAB plotting figure?

I have created a MATLAB plotting with the plot() function. How do I change the window title of the generated f

avatar
Serina
0 1 0 9
asked 07 September, 2021
59 votes
5 answers
1.4K views
Automatically plot different colored lines

I'm trying to plot several kernel density estimations on the same graph, and I want them to all be differ

avatar
Dusty
0 1 0 9
asked 07 September, 2021
49 votes
4 answers
1.9K views
xkcd style graphs in MATLAB

So talented people have figured out how to make xkcd style graphs in Mathematica, in LaTeX, in Python and in

avatar
Don
0 1 0 9
asked 07 September, 2021
56 votes
4 answers
1.2K views
MatPlotLib: Multiple datasets on the same scatter plot

I want to plot multiple data sets on the same scatter plot: cases = scatter(x[:4], y[:4], s=10, c='b&apo

avatar
Lynette
0 1 0 9
asked 07 September, 2021
69 votes
12 answers
2.1K views
scipy: savefig without frames, axes, only content

In numpy/scipy I have an image stored in an array. I can display it, I want to save it using savefig without a

avatar
Robyn
0 1 0 9
asked 07 September, 2021
48 votes
7 answers
1K views
Histogram Matplotlib

So I have a little problem. I have a data set in scipy that is already in the histogram format, so I have the

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
57 votes
6 answers
2.3K views
How to create a density plot in matplotlib?

In R I can create the desired output by doing: data = c(rep(1.5, 7), rep(2.5, 2), rep(3.5, 8), rep(

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
59 votes
3 answers
2.5K views
Confusion between numpy, scipy, matplotlib and pylab

Numpy, scipy, matplotlib, and pylab are common terms among they who use python for scientific computation. I

avatar
Arline
0 1 0 9
asked 07 September, 2021
60 votes
8 answers
2.4K views
Specifying and saving a figure with exact size in pixels

Say I have an image of size 3841 x 7195 pixels. I would like to save the contents of the figure to disk, resul

avatar
Virgil
0 1 0 9
asked 07 September, 2021
60 votes
22 answers
2.4K views
How do you change the size of figures drawn with Matplotlib?

How do you change the size of figure drawn with Matplotlib?

avatar
Keith
0 1 0 9
asked 07 September, 2021