Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log scale? #7

Closed
ettaka opened this issue Aug 12, 2011 · 4 comments
Closed

Log scale? #7

ettaka opened this issue Aug 12, 2011 · 4 comments

Comments

@ettaka
Copy link

ettaka commented Aug 12, 2011

Dear Developers and Users,

I have used feedGnulpot for a few days and I was wondering if there is a possibility to set logarithmic scale.
If this is possible to do, please advice.

Cheers,

Eelis

@dkogan
Copy link
Owner

dkogan commented Aug 12, 2011

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

@dkogan dkogan closed this as completed Aug 12, 2011
@ettaka
Copy link
Author

ettaka commented Aug 15, 2011

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

Cheers,

Eelis

@dannaf
Copy link

dannaf commented Apr 10, 2016

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

@dkogan
Copy link
Owner

dkogan commented Apr 11, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants