[Chart] Equal scale on both axes

Bjorn Buckwalter bjorn at buckwalter.se
Wed Oct 23 23:52:41 BST 2013


For the record this feature is high on my wish list too. Do you have any
ideas of where to start if one wanted to implement it?

I'll admit that I asked about this 2011-01 as well[1] but never took it
anywhere. I'm hoping the answer/right approach may be more obvious now with
the recent rework.

[1]: https://groups.google.com/forum/#!topic/haskell-charts/o_GMvJxndS4

Thanks,
Bjorn


On Wed, Oct 23, 2013 at 9:45 PM, Tim Docker <tim at dockerz.net> wrote:

> 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
>>
>>
> _______________________________________________
> 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/f357c705/attachment.htm>


More information about the Chart mailing list