Top "Plot" questions

The graphical representation of a mathematical function or a set of data.

Save plot to image file instead of displaying it using Matplotlib

I am writing a quick-and-dirty script to generate plots on the fly. I am using the code below (from Matplotlib …

python matplotlib plot
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 <- …

r plot ggplot2 r-faq
Changing the "tick frequency" on x or y axis in matplotlib?

I am trying to fix how python plots my data. Say x = [0,5,9,10,15] and y = [0,1,2,3,4] Then I would do: matplotlib.pyplot.…

python matplotlib plot axes xticks
When to use cla(), clf() or close() for clearing a plot in matplotlib?

Matplotlib offers there functions: cla() # Clear axis clf() # Clear figure close() # Close a figure window The documentation doesn't offer a …

matplotlib plot
Adding a legend to PyPlot in Matplotlib in the simplest manner possible

TL;DR -> How can one create a legend for a line graph in Matplotlib's PyPlot without creating any …

python matplotlib plot
How to set limits for axes in ggplot2 R plots?

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

r plot ggplot2
How to change legend title in ggplot

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

r plot ggplot2
How to increase font size in a plot in R?

I am confused. What is the right way to increase font size of text in the title, labels and other …

r plot
Hiding axis text in matplotlib plots

I'm trying to plot a figure without tickmarks or numbers on either of the axes (I use axes in the …

python matplotlib plot