Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change the size of a xyplot with plotchart

29 views
Skip to first unread message

shenye...@gmail.com

unread,
Oct 17, 2021, 6:21:27 AM10/17/21
to
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

Rich

unread,
Oct 17, 2021, 10:09:26 AM10/17/21
to
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.

Christian Gollwitzer

unread,
Oct 17, 2021, 11:08:14 AM10/17/21
to
Am 17.10.21 um 12:21 schrieb shenye...@gmail.com:
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


Arjen Markus

unread,
Oct 17, 2021, 1:38:58 PM10/17/21
to
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
0 new messages