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

Adjusting font and graph size to fit in a specific dimension #30

Closed
dibs439 opened this issue Jun 19, 2020 · 5 comments
Closed

Adjusting font and graph size to fit in a specific dimension #30

dibs439 opened this issue Jun 19, 2020 · 5 comments

Comments

@dibs439
Copy link

dibs439 commented Jun 19, 2020

Dear Author,

I have been able to generate charts with help from your end previously. At present the graph is generating at the height-width specific in the command. However, some part of the image is getting cut-off. And overall look and feel needs some adjustment. The current and expected output is attached for your reference. I would like the some inputs regarding:

  1. How to make the bars thinner lie in the expected.png
  2. Currently both bars are not showing side-by-side but they are overlapping.
  3. How to make the legends smaller
  4. Y-axis should show more steps.

I am using the following command:

sudo graph source.csv --bar --width 0.4 --title 'Title' --offset 0.2,0.2 --color='#f6b4be,#e1072f' --fontsize=12 --label-fontsize=8 --figsize=634x117 --xlabel-fontsize=10 --ylabel-fontsize=8 -o dest.png

Any inputs on any of the points will be highly appreciated.

expected
current

@dibs439
Copy link
Author

dibs439 commented Jun 21, 2020

Sir any thoughts on this?

@mcastorina
Copy link
Owner

Yes, creating bar graphs with the tool is not very intuitive (has been on my todo list for awhile)

  1. --width controls the bar width
  2. You need to set the offset manually to have both bars show; generally one is negative the other is positive and they should be half the --width value
    • For your example, it would be --offset=-0.2,0.2
  3. No support for this yet -- --fontsize does nothing #18
  4. --yrange min:max to control the start and end values of the y-axis; --yscale scale for the scaling (in other words.. --yscale 500 will draw a line every 500 y units

@mcastorina
Copy link
Owner

A workaround for all of the sizing problems would be to remove --figsize, then use imagemagick to resize the final image to fit your needs.

@mcastorina
Copy link
Owner

I have pushed an update for 3. You should be able to use --fontsize to set the global font size. This is in version 0.1.6

@dibs439
Copy link
Author

dibs439 commented Jul 1, 2020

The issue has been resolved thanks a lot!

@dibs439 dibs439 closed this as completed Jul 1, 2020
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

2 participants