[Chart] Equal scale on both axes

Tim Docker tim at dockerz.net
Wed Oct 23 20:45:02 BST 2013


Hi,

Welcome to the list.

There is currently no way to lock the aspect ratio in this way.

Setting the chart size sets the outputs size of the canvas. This includes
not just the plot area, but also the title, axis labels, legend, etc.

I think you will have to this manually, by choosing the aspect ratio of the
output image by setting its size, and then manually setting the range for
each axis to give you the desired aspect ratio in plot coordinates.

Cheers,

Tim
On 23 Oct 2013 01:24, "Triwanto Simanjuntak" <simanjuntak.triwanto at gmail.com>
wrote:

> I just subscribed this mailing list, so hello to all of you.
>
> Previously I asked the following question,
>
> [I'm a newbiee Haskell user and after have been toying with available
> plotting packages, I found that haskell-chart is the most reliable. So
> thanks for all the hard work!
>
> I have a small problem. Making the axes to be in logarithmic scale was
> easily done but I still can't manage to make both axes have equal scale.
> I'd be very happy to hear any suggestion on how to achieve it or where to
> look for solution.]
>
>
> and  then Tim replied,
>
> [By both axes, do you mean both Y axes, or the X and Y axes?]
>
>
> To clarify my question:
> I meant the latter one, X and Y axes of  a single plot to have equal scale
> (aspect ratio), [as for comparison for python-matplotlib, see
> http://goo.gl/gP7Sr4]
>
> Does simply invoking the chart's size to have equal lengths (square
> shape),
> e.g. renderableToPDFFile chartFoo 320 320 "chartFoo.pdf"
> the resulted chart will have equal aspect ratio?
> or the declared chart size is basically the size of the canvas
> ?
>
> Thanks,
>
>
> Triwanto
>
>
>
> _______________________________________________
> Chart mailing list
> Chart at projects.haskell.org
> http://projects.haskell.org/cgi-bin/mailman/listinfo/chart
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/chart/attachments/20131024/864fcfae/attachment.htm>


More information about the Chart mailing list