Scruffy Graph is Cropped

A

Alex DeCaria

I'm running the Scruffy example for a line graph from
http://scruffy.rubyforge.org/. My code is

require 'scruffy'

graph = Scruffy::Graph.new
graph.title = "Sample Line Graph"
graph.renderer = Scruffy::Renderers::Standard.new

graph.add :line, 'Example', [20, 100, 70, 30, 106]

graph.render :to => "line_test.svg"
graph.render :width => 300, :height => 200,
:to => "line_test.png", :as => 'png'

The output is severely cropped, showing only an incomplete graph (see
attached .png file).

I've played with the :width and :height parameters, but just make things
worse. Can someone shed some light on this?

Thanks,

--Alex DeCaria

Attachments:
http://www.ruby-forum.com/attachment/4490/line_test.png
 
M

Matt Powell

Hi Alex,

Did you ever get to the bottom of this? I'm getting the exact same
behaviour.

I'm on Mac OSX.

Perhaps it's an ImageMagick version type issue?

//matt
 
A

Alex Stahl

[Note: parts of this message were removed to make it a legal post.]

Just a check here... am I the Alex you're addressing? I do recall being
on a Scruffy Graph thread a while back, but don't recall any specifics.

If I'm the wrong Alex, feel free to disregard. Otherwise, refresh my
memory on the issue? (I'm a list subscriber and so not reading a
threaded version on the website and have no reference to the origin).


________________________________________________________________________

Alex Stahl | Sr. Quality Engineer | hi5 Networks, Inc. | (e-mail address removed)
|
 
M

Matt Powell

Don't think so, but thanks for the quick reply! Here's the original
post:

------------

I'm running the Scruffy example for a line graph from
http://scruffy.rubyforge.org/. My code is

require 'scruffy'

graph = Scruffy::Graph.new
graph.title = "Sample Line Graph"
graph.renderer = Scruffy::Renderers::Standard.new

graph.add :line, 'Example', [20, 100, 70, 30, 106]

graph.render :to => "line_test.svg"
graph.render :width => 300, :height => 200,
:to => "line_test.png", :as => 'png'

The output is severely cropped, showing only an incomplete graph (see
attached .png file).

I've played with the :width and :height parameters, but just make things
worse. Can someone shed some light on this?

Thanks,

--Alex DeCaria
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top