Plot - Units, different axis names than x, y, ...

Plot - Units, different axis names than x, y, ... - I cannot make any sensible and useful engineering plot working. - Сообщения

#1 Опубликовано: 16.03.2026 10:36:26
Olda Dajbych

Olda Dajbych

0 сообщений из 2 понравились пользователям.

Группа: User

Hello,
I am a satisfied SMath user and have recommended it to my engineering students. We have immediately stumbled over a huge problem. We are unable to show any meaningful graphs of real problems. With units, correct names or descriptions on axes, etc. I have tried everything, but once I don't see any errors, the graph still shows nothing. Then, there is an error, something like "Result is over max. positive number." I am just trying to display a sine wave voltage. Please, can somebody help me? I was googling extensively, but when there is a promising answer, it is very vague, just showing that it is possible without any help.

This is just my trials, but I have not been able to get any curves in the several graphs.



Edit: The image does not show. You can find it here: http://public.uli.cz/smath-plot.png

Thanks a lot
Olda
Отредактировано 16.03.2026 10:37:57
#2 Опубликовано: 16.03.2026 12:13:23
overlord

overlord

587 сообщений из 1 360 понравились пользователям.

Группа: Moderator

If you are working with vectors, you need to use vectorize().
If you are trying to plot, only Y axis values not enough.
You have to tell what are X values also.

Regards

2026-03-16_15-11.png
#3 Опубликовано: 16.03.2026 13:39:19
overlord

overlord

587 сообщений из 1 360 понравились пользователям.

Группа: Moderator

You can animate it too.

sinewave.sm (6,69 КиБ) скачан 11 раз(а).

sinewave.gif
Отредактировано 16.03.2026 13:42:30
#4 Опубликовано: 17.03.2026 09:33:46
Olda Dajbych

Olda Dajbych

0 сообщений из 2 понравились пользователям.

Группа: User

Thank you very much!

Now, is there a reasonably simple way to get t [s] and U [V] to the axes? Or at least some description. I really love SMath, and I didn't need the plots because I am mostly doing some mechanical engineering and machine design linear calculations. But as soon as I showed that software to my more electrical engineering-focused students, they came up with this question. I have been using Mathcad (v14 and 15) for a long time, and there is no problem doing this task very easily. I have been really surprised by how big a problem it is for SMath.

Thanks a lot again
Olda
#5 Опубликовано: 17.03.2026 13:25:56
Вячеслав Мезенцев

Вячеслав Мезенцев

1 533 сообщений из 1 849 понравились пользователям.

Группа: Moderator

Historically, many components in a document have only one placeholder. This applies to plot components as well. Therefore, working with them is different. With only one placeholder, it's difficult to explain to the component what's expected of it.
This was originally done to simplify component creation. It was later retained for compatibility reasons.
Now, by default, the argument range is taken from the plot itself; it doesn't need to be specified explicitly.

image.png

In the plot above, we say to use the x-axis value with a specific unit as an argument so that the calculation inside the component does not return an error.

Using a vector (range variable) is a special case for X-Y Plot.

image.png
Отредактировано 17.03.2026 13:34:59
Russia ☭ forever, Viacheslav N. Mezentsev
  • Новые сообщения
  • Нет новых сообщений