Questions tagged [par]

This tag has no Wiki Excerpt yet!

par is a paragraph reformatter, vaguely similar to fmt, but better. It can format, justify, align, slice and dice using a bewildering array of options. See http://www.nicemice.net/par/

par is a filter which copies its input to its output, changing all white characters (except newlines) to spaces, and reformatting each paragraph. Paragraphs are separated by protected, blank, and bodiless lines (see the Terminology section for definitions), and optionally delimited by indentation (see the d option in the Options section). Each output paragraph is generated from the corresponding input paragraph as follows:

  1. An optional prefix and/or suffix is removed from each input line.
  2. The remainder is divided into words (separated by spaces).
  3. The words are joined into lines to make an eye-pleasing paragraph.
  4. The prefixes and suffixes are reattached.

If there are suffixes, spaces are inserted before them so that they all end in the same column.

In scientific software for statistical computing and graphics, par is a use function to set or query graphical parameters. Many parameters can also be passed as arguments to plotting functions. See ?par.

213 questions
88
votes
6 answers

Reset par to the default values at startup

Normally when I make my own plot functions, I make a construct : op <- par("mypar"=myvalue) on.exit(par(op)) which is the standard way of reverting the par to the previous values. Imagine you've been running some functions that did change some of…
Joris Meys
  • 106,551
  • 31
  • 221
  • 263
77
votes
5 answers

Common main title of a figure panel compiled with par(mfrow)

I have a compilation of 4 plots drawn together with par(mfrow=c(2,2)). I would like to draw a common title for the 2 above plots and a common title for the 2 below panels that are centered between the 2 left and right plots. Is this possible?
ECII
  • 10,297
  • 18
  • 80
  • 121
25
votes
3 answers

Specify Width and Height of Plot

I have a panel containing three plots. How can I use par to specify the width and height of the main panel so it is always at a fixed size?
Ryan R. Rosario
  • 5,114
  • 9
  • 41
  • 56
24
votes
3 answers

Combined plot of ggplot2 (Not in a single Plot), using par() or layout() function?

I've been thinking of using par() or layout() functions for combining ggplots. Will it be possible to use those functions? Say I want to plot ggplot for scatterplot and ggplot for histogram. And I want to combine the two plots (NOT IN A SINGLE…
Al-Ahmadgaid Asaad
  • 1,172
  • 5
  • 13
  • 25
20
votes
5 answers

Plot fitted line within certain range R

Using R, I would like to plot a linear relationship between two variables, but I would like the fitted line to be present only within the range of the data. For example, if I have the following code, I would like the line to exist only from x and y…
Thraupidae
  • 665
  • 2
  • 5
  • 14
17
votes
2 answers

plots generated by 'plot' and 'ggplot' side-by-side

Is there a way to put the plot generated by plot function and the plot by ggplot function in R in one page side-by-side? It is easy to put plots created by the same function into one page using par or multiplot function, but I can't figure out the…
Elaine
  • 395
  • 2
  • 10
9
votes
1 answer

What is a null graphics device?

I'm reading the R help page for ?devAskNewPage (it was linked from ?par...ask). I can't understand what par(ask=F) / par(ask=T) does. What do I need to read about to understand this: If the current device is the null device, this will open a …
isomorphismes
  • 8,233
  • 9
  • 59
  • 70
8
votes
6 answers

How to install pp (PAR Packager)?

I have to create an exe from a Perl script. I installed ActivePerl-5.14.2.1402-MSWin32-x86-295342.msi How do I install pp?
8
votes
1 answer

Scala Parallel Print Hanging the console

I am new to this Scala world and I am trying some exercises from a book. So, I have an example that print a vector in sequential and parallel fashion. The former works perfectly and the later hangs the console. Code val v = Vector.range(0,…
Israel Zinc
  • 2,713
  • 2
  • 18
  • 30
7
votes
3 answers

plot got cut off after saving to file

My fig has a large legend outside the plot. 6 lines with long description When I save it, the legend doesn't show up. I adjusted par, but it still doesn't work. legend("topright", inset=c(-0.6,0),xpd=TRUE,cex=0.8, +legend=c("A_all peaks","B_ from…
lxcfuji
  • 329
  • 1
  • 4
  • 15
7
votes
2 answers

Is there a way to package my unit tests with PAR or PerlApp?

I have an app that I pack into "binary" form using PerlApp for distribution. Since my clients want a simple install for their Win32 systems, this works very nicely. Now a client has decided that they need to run all unit tests, like in a standard…
daotoad
  • 26,689
  • 7
  • 59
  • 100
6
votes
2 answers

Histogram, error: Error in plot.new() : figure margins too large

I have to plot 141 histograms in R. I am working with windows 8. then I write: par(mfcol=c(12,12), oma=c(1,1,0,0)) for(m in 1:141 ){ x <- precData[[m]] hist(x[x != 0],30, xlab=NA, ylab=NA, main=statData$Name[m]) } But always I get this error:…
user3054327
  • 87
  • 1
  • 1
  • 6
6
votes
2 answers

How do I jitter the node split strings in plotting ctree output from partykit?

I have an issue where I am using mainly categorical data, set to a class of factor, in a classification tree. I am using the partykit package in R and not party as previous answers here suggested that the former package is better for manipulation of…
Michelle
  • 1,281
  • 2
  • 16
  • 31
6
votes
3 answers

Perl Install PAR:Packer Problems

My perl version is 5.16.2 on my Windows 7 64bit, I failed to install PAR:Packer. I tried active perl and strawberry perl , both got the same error. Can you please give me some suggestion. Below is my experience: I tried ppm install PAR:Packer,…
emily
  • 61
  • 1
  • 3
6
votes
2 answers

Centring legend below two plots in r

I would like to centre a common legend below two plots. I have used xpd=TRUE to allow for printing outside the plot itself and oma to create space for the legend. However the legend will not move horizonatally and gets clipped 'early' vertically.…
Elizabeth
  • 6,391
  • 17
  • 62
  • 90
1
2 3
14 15