Coder Social home page Coder Social logo

Log scale? about feedgnuplot HOT 4 CLOSED

dkogan avatar dkogan commented on August 28, 2024
Log scale?

from feedgnuplot.

Comments (4)

dkogan avatar dkogan commented on August 28, 2024 2

Sure. Commands to gnuplot can be given:

feedgnuplot --extracmds 'set logscale xy'

will send that string as a command to gnuplot prior to sending it any data. The above sets the x and y axes to be base-10 logarithmic. Other options are available, of course. See the gnuplot docs for more info

from feedgnuplot.

ettaka avatar ettaka commented on August 28, 2024

Great! Thank you very much, I appreciate your fast response.

Cheers,

Eelis

from feedgnuplot.

dannaf avatar dannaf commented on August 28, 2024

Hi,

Any advice on doing histograms with logarithmic axes? E.g. I am working off the sample code for plotting a histogram of file sizes in a directory, but my files are dominated primarily by a filesize of < 10 MB, with a few in the 10-200 MB range, within this particular folder. So I get a tall box counting many between 0 to 10 MB, but I'd like some more information here. (I could plot separately a histogram of that range, but I think a logarithmic x-axis (file size) scale would do well, as it should give more information about these files while clustering the larger filesizes together more, which is fine).

I tried:
ls -l | awk '{print $5/1e6}' | feedgnuplot --histogram 0 --with boxes --binwidth 10 --set 'style fill solid' --ymin 0 --xlabel 'File size (MB)' --ylabel Frequency --extracmds 'set logscale x' --xmin 1

but this did not work well.

Note that I set --xmin 1 because it gives an error without it:

Warning: empty x range [0:0], adjusting to [-1:1]
         line 73: x range must be greater than 0 for log scale

Please advise.

Thanks,
Daniel

from feedgnuplot.

dkogan avatar dkogan commented on August 28, 2024

Hi. With a logscale histogram, it's not clear what the binwidth means. If you set it much lower, you might get more pleasing results. Try 0.1

from feedgnuplot.

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.