Giter Club home page Giter Club logo

Comments (3)

lmrodriguezr avatar lmrodriguezr commented on June 20, 2024

Hello @russejenn
Note that you're using a syntax that is no longer supported (kept for backwards compatibility). I'm suggesting below the easier-to-use version of the same code you have (using Nonpareil.set instead of Nonpareil.curve.batch).

There are two ways to achieve this.
My preferred option is to turn off the legend first, and then plot the legend separately:

samples <- read.table('Nonpareil.samples.txt', sep = '\t', header = TRUE, as.is = TRUE)
non <- Nonpareil.set(samples$File,
  labels = samples$Name,
  plot.opts = list(plot.model = FALSE, legend.opts = FALSE))
Nonpareil.legend(non, 'topright')

However, you can also achieve that with a single command:

samples <- read.table('Nonpareil.samples.txt', sep = '\t', header = TRUE, as.is = TRUE)
non <- Nonpareil.set(samples$File,
  labels = samples$Name,
  plot.opts = list(plot.model = FALSE, legend.opts = list(x = 'topright')))

from nonpareil.

lmrodriguezr avatar lmrodriguezr commented on June 20, 2024

Please feel to reopen if this doesn't work for you

from nonpareil.

ReneKat avatar ReneKat commented on June 20, 2024

Hello!
First, a big THANK YOU for making nonpareil and its documentation.
This is just a comment on manipulating legends. I had a similar issue to others that have posted regarding legends. I wanted to share what worked for me. As was already mentioned, any argument in legend() can be applied to legend.opts .
I found cex = XX to be an easy fix to shrink or enlarge a legend. For example,
Nonpareil.set(File, col=Color, labels=Name, plot.opts = list(legend.opts = list(cex = 0.6)))
shrank my legend so all of it could be visible.
Hope this helps someone!
Take Care,
Rene

from nonpareil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.