• How to change the size of a xyplot with plotchart

    From shenyeh.chen@gmail.com@21:1/5 to All on Sun Oct 17 03:21:25 2021
    I am wondering, I can I change the size of an xyplot created by Plotchart ?

    Is it sometime like
    ::Plotchart::plotconfig xyplot margin bottom 40
    ::Plotchart::plotconfig xyplot margin left 0

    I have tried these but the chart remains the same size.
    Any help is appreciated.

    Regards
    S-Y. Chen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to shenye...@gmail.com on Sun Oct 17 14:09:23 2021
    shenye...@gmail.com <shenyeh.chen@gmail.com> wrote:
    I am wondering, I can I change the size of an xyplot created by
    Plotchart ?

    Is it sometime like
    ::Plotchart::plotconfig xyplot margin bottom 40
    ::Plotchart::plotconfig xyplot margin left 0

    I have tried these but the chart remains the same size.
    Any help is appreciated.

    From the docs (https://core.tcl-lang.org/tklib/doc/trunk/embedded/www/tklib/files/modules/plotchart/plotchart.html),
    it appears that you specify the size of the plot when you create it:

    ::Plotchart::createXYPlot w xaxis yaxis args

    list xaxis (in)

    A 3-element list containing minimum, maximum and stepsize for
    the x-axis, in this order. For an inverted axis, where the maximum
    appears on the left-hand side, use: maximum, minimum and a negative
    stepsize.

    list yaxis (in)

    A 3-element list containing minimum, maximum and stepsize for
    the y-axis, in this order. For an inverted axis, where the maximum
    appears at the bottom, use: maximum, minimum and a negative
    stepsize.

    Or by the xconfig/yconfig commands:

    $anyplot xconfig -option value ...

    scale scale_data

    New scale data for the axis, i.e. a 3-element list containing
    minimum, maximum and stepsize for the axis, in this order.

    Beware: Setting this option will clear all data from the plot.

    But note the "Beware" warning in the docs for xconfig/yconfig.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Christian Gollwitzer@21:1/5 to All on Sun Oct 17 17:08:10 2021
    Am 17.10.21 um 12:21 schrieb shenye...@gmail.com:
    I am wondering, I can I change the size of an xyplot created by Plotchart ?

    Is it sometime like
    ::Plotchart::plotconfig xyplot margin bottom 40
    ::Plotchart::plotconfig xyplot margin left 0

    I have tried these but the chart remains the same size.
    Any help is appreciated.

    If you are looking for an alternative, take a look at ukaz

    https://github.com/auriocus/ukaz

    It does automatic data management, i.e. you create a plot and it can be
    scaled / zoomed in.

    See https://github.com/auriocus/ukaz/blob/master/demo/simpletest.tcl

    Christian

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Arjen Markus@21:1/5 to shenye on Sun Oct 17 10:38:56 2021
    On Sunday, October 17, 2021 at 12:21:27 PM UTC+2, shenye wrote:
    I am wondering, I can I change the size of an xyplot created by Plotchart ?

    Is it sometime like
    ::Plotchart::plotconfig xyplot margin bottom 40
    ::Plotchart::plotconfig xyplot margin left 0

    I have tried these but the chart remains the same size.
    Any help is appreciated.

    Regards
    S-Y. Chen
    It should work pretty much in that way. But note:
    - the plotstyle command lets you define different styles
    - the configuration options take effect only for the next plot

    Regards,

    Arjen

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)