Maxima plot

Maxima plot - How to add point in maxima plot - Сообщения

#1 Опубликовано: 22.01.2026 10:52:55
Tomas Novotny

Tomas Novotny

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

Группа: User

Hi, i would like to add some points to 3D plot. How can I do that?
And can i somehow make the plot smooth without using smaller steps in vectors?
Snímek obrazovky 2026-01-22 114852.png
Kompresibilita_3D.sm (56,04 КиБ) скачан 237 раз(а).

Thanks for answers,
Tomas
Отредактировано 22.01.2026 10:54:05
#2 Опубликовано: 22.01.2026 14:08:14
Martin Kraska

Martin Kraska

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

Группа: Moderator

You could try to create a mesh of triangles or quadrilateral objects. Then you are free to use a problem-adjusted surface parametrization.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#3 Опубликовано: 27.01.2026 21:55:32
Tomas Novotny

Tomas Novotny

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

Группа: User

Hi,
thanks for your answer. I have another question. I´m trying to make graph of water density, but the axes are not right, what is wrong?

image.png
hustota vody.sm (69 КиБ) скачан 140 раз(а).

Thanks,
Tomáš
#4 Опубликовано: 28.01.2026 00:09:04
Martin Kraska

Martin Kraska

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

Группа: Moderator

This is probably due to the "visual" indexing in the matrix.

Rows in a matrix are increasing top-down, whereas values in y are increasing bottom-up.

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#5 Опубликовано: 28.01.2026 08:23:58
Tomas Novotny

Tomas Novotny

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

Группа: User

Thanks you very much! That helped.
But if i want to make axes right i have to switch x and y axes in elevation grid command. I don’t know why.
image.png
hustota vody.sm (135,01 КиБ) скачан 152 раз(а).

Is there any sheet of something like that, where I can fing all comands for plots? And how can I write them, because commands that I used, I copied from some file I found.

Thanks for answers,
Tomáš
#6 Опубликовано: 28.01.2026 17:30:00
Martin Kraska

Martin Kraska

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

Группа: Moderator

See topic starter https://smath.com/en-US/forum/topic/cnc5Xp/Maxima-Plugin. I added some references there.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#7 Опубликовано: 28.01.2026 19:33:40
Tomas Novotny

Tomas Novotny

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

Группа: User

That is awesome!

Thanks,
Tomáš
#8 Опубликовано: 06.02.2026 11:03:04
Tomas Novotny

Tomas Novotny

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

Группа: User

Hi,
how can I add point B to plot? When I tried I make point or plot, but not both of them.

image.png
kriticky_bod.sm (202,22 КиБ) скачан 87 раз(а).

Thanks for answers,
Tomas
#9 Опубликовано: 06.02.2026 13:25:26
Martin Kraska

Martin Kraska

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

Группа: Moderator

Seems to be related to the negative temperature range in the elevation_grid command.

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#10 Опубликовано: 10.02.2026 07:29:28
Tomas Novotny

Tomas Novotny

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

Группа: User

Thanks for answer,
I tried to fix it and I ended with this. Still can t plot graph and point together.

image.png

kriticky_bod.sm (201,86 КиБ) скачан 69 раз(а).

What should I do now?

Tomáš
#11 Опубликовано: 10.02.2026 15:54:04
Martin Kraska

Martin Kraska

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

Группа: Moderator

You still have a negative h value (temperature difference). Reverse this (and also reverse the matrix). Then it should work.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#12 Опубликовано: 19.02.2026 08:34:45
Tomas Novotny

Tomas Novotny

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

Группа: User

Thank you very much! It works.

image.png

Tomáš
#13 Опубликовано: 19.02.2026 10:12:49
Martin Kraska

Martin Kraska

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

Группа: Moderator

Good to see. You also might display the z values in MJ/kg to get nicer tick labels and play around with the view parameters in the settings menu to avoid interference between axis label and tick labels.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#14 Опубликовано: 19.02.2026 11:38:12
Tomas Novotny

Tomas Novotny

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

Группа: User

Now I would like to add saturation curve. Is it better to go with matrix or function? And how can I do that?

image.png

I tried parametric function, but plot did not work.

image.png

krit_bod_2.sm (211,84 КиБ) скачан 47 раз(а).

Thanks for answers!

Tomáš
Отредактировано 19.02.2026 12:05:07
#15 Опубликовано: 19.02.2026 13:01:39
Martin Kraska

Martin Kraska

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

Группа: Moderator

I guess it is best to use the points object just like for the single point. Set points_joined to true, point_type to something convenient. Using a function will work only if that function is supported by the interface to Maxima, which probably doesn't apply to coolprop functions or interpolated functions.

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#16 Опубликовано: 22.02.2026 18:05:46
Tomas Novotny

Tomas Novotny

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

Группа: User

Hi,
I’m back. I tried to create line of points by maxima handbook. Handbook is really great, but I couldn’t figure it out. What am I doing wrong? Matrix seems right.

And i have another question. When I created plot of enthalpy I just wrote name of the "plot function". But in the manual, there is Draw3D("plot function"). Why is that?

image.png

saturation_curve.sm (194,75 КиБ) скачан 32 раз(а).

Thanks for your help and patient, I really appriciate it.

Tomáš
#17 Опубликовано: 23.02.2026 10:20:19
Martin Kraska

Martin Kraska

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

Группа: Moderator

Your data matrix isn't in the correct format. It is a one-column matrix of row vectors. Make it a real n x 3 matrix, then try again.

Also, you use different units when filling the data matrix (J/kg) and for the axis limits (kJ/kg).

As to the Draw3D command, see intro text to Chapter 3.

grafik.png

grafik.png
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#18 Опубликовано: 26.02.2026 12:23:13
Tomas Novotny

Tomas Novotny

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

Группа: User

Hi,
finally I’v done it! Thank you very much Martin! I think it looks great.
Now I would like to continue and mabye try to make something bigger and try to use Smath viewer.

image.png

Entalpie_pT.sm (156,56 КиБ) скачан 25 раз(а).

Tomáš
1 пользователям понравился этот пост
Martin Kraska 26.02.2026 16:32:09
#19 Опубликовано: 26.02.2026 16:31:44
Martin Kraska

Martin Kraska

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

Группа: Moderator

Interesting example. It would also be interesting to set up a chat bot with knowledge of all the SMath handbooks and forum posts.

BTW, I didn't test the viewer with the Maxima plugin, at least no particular provisions have been made to make it work in the viewer. Strictly speaking, such a viewer executable would need to contain a portable Maxima installation. This is not a trivial thing, as a lot of environment variables have to be set, In the begin of the development, we used to modify the Maxima installation (Maxima.bat under Windows), yet that had to be updated for each new version of Maxima, so that we switched using a non-modified entirely generic Maxima installation on the computer. Up to now this approach seems to be robust, yet not portable.

There have been multiple examples of using 2D plots for 3D diagrams by means of coordinate transformations. That might be a Viewer-proof option.
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
  • Новые сообщения
  • Нет новых сообщений