Skip to content

Commit

Permalink
xlim in plot
Browse files Browse the repository at this point in the history
  • Loading branch information
aiorazabala committed Sep 7, 2016
1 parent 2fe1976 commit 7894318
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: qmethod
Version: 1.4.2
Version: 1.4.3
Date: 2016-04-14
Title: Analysis of Subjective Perspectives Using Q Methodology
Authors@R: c(person(given="Aiora", family="Zabala", comment="Main author", email="aiora.zabala@gmail.com", role=c("aut", "cre")),
Expand Down
7 changes: 5 additions & 2 deletions R/plot.QmethodRes.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ plot.QmethodRes <- function(x,
pchlist = NULL, colours = NULL,
fnames = NULL, legend = TRUE,
dist = TRUE, pchlist.fill = NULL,
leg.pos="bottomright", ...) {
leg.pos="bottomright", xlim= NULL, ...) {
dfr <- x$zsc
lowlim <- floor(min(dfr[[1]]))
highlim <- ceiling(max(dfr))
if (is.null(xlim)) {
xlimits <- c(lowlim, highlim)
} else xlimits = xlim
if (is.null(pchlist)) {
pchlist <- c(1, 2, 0, 5, 6, 16, 17, 15, 18, 21, 24, 23, 22, 3, 4, 7, 8, 9)
pchlist.fill <- c(16, 17, 15, 23, 25, 16, 17, 15, 18, 21, 24, 23, 22, 3, 4, 7, 8, 9)
Expand All @@ -20,7 +23,7 @@ plot.QmethodRes <- function(x,
if (is.null(fnames) & names(x$zsc)[1] == "zsc_f1") fnames <- paste0("Factor ", 1:nfactors)
if (is.null(fnames) & names(x$zsc)[1] != "zsc_f1") fnames <- names(x$zsc)
dotchart(dfr[[1]], lcolor=grey(0.4),
xlim=c(lowlim, highlim),
xlim=xlimits,
ylab=ylab, xlab=xlab, axis=NULL,
pch=pchlist[[1]], color=colours[[1]], ...)
for (i in 2:nfactors){
Expand Down

0 comments on commit 7894318

Please sign in to comment.