The Chart Tool

Hi,

I have some questions regarding the Chart tool. I want to plot several things but I find the chart really hard to use.
My first question, is there a way to change the default settings?
I would like the auto scaling of the axis to be off, takes a lot of time to go into the properties and change it every time. Also, is there a way to make the series have another color from the start when a new is added? I have noticed that if I plot several, for example muscles, by using * there will be different colors. But if I add a new serie it will always be red. I mostly want to plot different muscles and therefore I need different series…
The last question I have is if there is a parameter representing joint power, computed during the ID?

Kind regards,
Maria

[LEFT]Hi Maria,

If you often want to use a specific chart setup for a model you have two different ways of doing this in AnyBody. You can either set up an AnyBody Workspace where you have a chart open with the specific setup that you want, or you can define the chart you want in AnyScript and use the AnyProject functionality to open the chart (from the Project tab of the Tree pane).

I have created a very small example of how to do this (based on the AnyProject classexample included with the AnyBody installation).

The example uses the Demo.Arm2D.any model from the classexamples, but it can easily be modified to be used with whatever model you’re using.

The concept is that you define an AnyChart in AnyScript and use it to define all the nondefault settings that you want it to have. For this example I have specified 2 series with a vector of RGB values for each (in order to give all values for each series the same color).
I have also specified autoscaling of the axis to be off for both abscissa and value axis.

In order to display this AnyScript-defined AnyChart, I have created an AnyProject which has an Output folder containing an AnyProjectChart which can be used for opening or setting this AnyChart.

I have included the code below:
[/LEFT]
Main = {
[SIZE=3]#include[/SIZE] “Demo.arm2d.any”
[SIZE=3]AnyChart[/SIZE] Chart_MaxActivity =
{
Visible = Off;
Series =
{
[SIZE=3]AnyChartSerie[/SIZE] Serie1 = {
Abscissa = “Main.ArmModelStudy.Output.Abscissa.t”;
Value = “Main.ArmModelStudy.Output.Model.Muscles..Activity";
Lines =
{
Visible = On;
[SIZE=3][/SIZE]RGB[SIZE=3] [/SIZE]=[SIZE=3] [/SIZE]{{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0},{0,1,0}};
};
};
[SIZE=3]AnyChartSerie[/SIZE] Serie2 = {
Abscissa = “Main.ArmModelStudy.Output.Abscissa.t”;
Value = "Main.ArmModelStudy.Output.Model.Segs.UpperArm.
.r[0]”;
Lines =
{
Visible = On;
RGB = {{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,0,0},{1,0,0}};
};
};
};
AbsAxis =
{
Visible = On;
AutoMin = Off;
AutoMax = Off;
Min = 0.25;
Max = 0.75;
Title =
{
Visible = On;
Font =
{
RGB = {0, 0, 0};
FontName = “Times New Roman”;
Height = 20;
Width = 8;
Bold = Off;
Italic = Off;
BillBoardView = On;
ModelSized = On;
ModelScaleHeight = 1;
ModelScaleWidth = 1;
};
Text = “Abscissa”;
};
Unit1 =
{
Visible = On;
AutoUnit = On;
Divisions = 5;
Unit = 0.025;
TickInside = 0.05;
TickOutside = 0;
GridLines = Off;
GridLineStyle =
{
Style = Line3DStyleFull;
Thickness = 1;
RGB = {0.25, 0.25, 0.25};
};
Text = On;
TextFont =
{
RGB = {0, 0, 0};
FontName = “Times New Roman”;
Height = 20;
Width = 8;
Bold = Off;
Italic = Off;
BillBoardView = On;
ModelSized = On;
ModelScaleHeight = 1;
ModelScaleWidth = 1;
};
TextSpace = 0.05;
NumberFormat =
{
Digits = 1;
Style = 0;
Scale = On;
ScaleVal = 1;
};
};
};
ValueAxis =
{
Visible = On;
AutoMin = Off;
AutoMax = Off;
Min = 0.00;
Max = 0.15;
Title =
{
Visible = On;
Font =
{
RGB = {0, 0, 0};
FontName = “Times New Roman”;
Height = 20;
Width = 8;
Bold = Off;
Italic = Off;
BillBoardView = On;
ModelSized = On;
ModelScaleHeight = 1;
ModelScaleWidth = 1;
};
Text = “Value”;
};
Unit1 =
{
Visible = On;
AutoUnit = On;
Divisions = 5;
Unit = 0.025;
TickInside = 0.05;
TickOutside = 0.0;
GridLines = Off;
GridLineStyle =
{
Style = Line3DStyleFull;
Thickness = 1;
RGB = {0.25, 0.25, 0.25};
};
Text = On;
TextFont =
{
RGB = {0, 0, 0};
FontName = “Times New Roman”;
Height = 20;
Width = 8;
Bold = Off;
Italic = Off;
BillBoardView = On;
ModelSized = On;
ModelScaleHeight = 1;
ModelScaleWidth = 1;
};
TextSpace = 0.05;
NumberFormat =
{
Digits = 1;
Style = 0;
Scale = On;
ScaleVal = 1;
};
};
};
};

[SIZE=3]AnyProject[/SIZE] ArmProject = {

Output = {
[SIZE=3]AnyProjectChart[/SIZE] MaxActivityChart = {
Chart = &Main.Chart_MaxActivity;
};
};
};

}; // Main

Hi Jesper,
Thank you very much for your answer. It was very helpful!

/Maria

I have another question as well. Is it possible to plot Joint Power? I can’t find it anywhere…

/Maria

Hi Maria,

There is no prepared value for joint power.

You have to define your own variable for that.
You can just define a variable which is the multiplication between the joint torque and the joint angular velocity.

Best regards,
Moonki

Hi Moonki,
Thanks for the answer. I was considering that too but then I just want to double check that the joint angle (and it’s velocity and acceleration) is what I find in the folder of Output.Bodymodel.Interface.Right.HipFlexion (and then the same for Ankle and Knee)?

Kind regards,
Maria

Hi Maria,

Yes. You are right. You can use those kinematic measures in the interface folder.

And you can use the joint moments in the SelectedOutput folder of our human model.

Best regards,
Moonki

Thanks Moonki,
Another question. Is there a kind of explanation to what all the different options for plotting (in the Output folder) means? And also which unit they have? A lot of them are obvious but not all of them, like the angle I was asking about earlier. The one I am wondering about the most at the moment is the Activity of different muscles. What unit is that? I thought that it was a percentage of maximum capacity but then I found a muscle with activity above 1.

Kind regards,
Maria

Hi Maria,

AnyBody use the MKS units. (Meter , Kilogram, Second)
And for angle, AnyBody use radian.
Muscle activation is the ratio of the actual muscle force with respect to its maximum capacity(strength). So it should be between 0 and 1. So it’s a kind of dimensionless value.
But as you mentioned, sometimes you may be able to find some muscle activation values which are above 1.
It means that those muscle are overloaded in order to generate bigger forces than its maximum capacity.

Best regards,
Moonki