-
Notifications
You must be signed in to change notification settings - Fork 412
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
Background images for plots #219
base: master
Are you sure you want to change the base?
Background images for plots #219
Conversation
... and therefore allow py2exe to do a better job in packaging.
- fix specifying a value_formatter, needed to be excluded from the js…
I am in vacation right now I'll review as soon as I come back. Cheers. (For Le dim. 7 juin 2015 11:15, never-eat-yellow-snow notifications@github.com
|
I did, but I probably made the mistake to merge them all back to the master branch of my fork... Anyway I'd clean up this mess when you say that this is something you consider for the main line. Happy holiday! |
So I looked into it, it may be useful to have a background image feature. |
I'm aware of the need for the cleanup and I'll do it, if this is something you are willing to merge. I use this currently like this to create an overlay over a background image (assuming image.png has 600x400 pixels): from pygal import XY
chart=XY(show_dots=False,
interpolate='hermite',
include_x_axis=True,
background_image="image.png",
preserve_aspect=True,
width = 600,
height= 400,
show_legend = False,
)
chart.add('lowerleft', [(0,0)])
chart.add('upperright',[(600,400)])
chart.add('test', [(110,110), (500,300)])
out = chart.render()
open("test.svg", "wb").write(out) You see that I have to manually add lowerleft and upperright hints to ensure the limits of the axis (maybe a seperate API would be good for that?). |
See also: #216
This one also adds support for a preserve_aspect configuration for keeping the graph's aspect ratio (in case this makes sense for the graph). I didn't fiddle with the tests yet.
I also realized that this branch somehow contains the other two pull requests - this is probably because I'm new to git and done something wrong...
Anyway, please give me some feedback whether this feature has chances for the mainline or not.