Maxima plot

Maxima plot - How to add point in maxima plot - Messaggi

#1 Pubblicato: 22/01/2026 10:52:55
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 866 volta(e).

Thanks for answers,
Tomas
Modificato 22/01/2026 10:54:05
#2 Pubblicato: 22/01/2026 14:08:14
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 27/01/2026 21:55:32
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 764 volta(e).

Thanks,
Tomáš
#4 Pubblicato: 28/01/2026 00:09:04
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 28/01/2026 08:23:58
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 770 volta(e).

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 Pubblicato: 28/01/2026 17:30:00
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 28/01/2026 19:33:40
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: User

That is awesome!

Thanks,
Tomáš
#8 Pubblicato: 06/02/2026 11:03:04
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 778 volta(e).

Thanks for answers,
Tomas
#9 Pubblicato: 06/02/2026 13:25:26
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 10/02/2026 07:29:28
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 730 volta(e).

What should I do now?

Tomáš
#11 Pubblicato: 10/02/2026 15:54:04
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 19/02/2026 08:34:45
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: User

Thank you very much! It works.

image.png

Tomáš
#13 Pubblicato: 19/02/2026 10:12:49
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 19/02/2026 11:38:12
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 735 volta(e).

Thanks for answers!

Tomáš
Modificato 19/02/2026 12:05:07
#15 Pubblicato: 19/02/2026 13:01:39
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 22/02/2026 18:05:46
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 678 volta(e).

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

Tomáš
#17 Pubblicato: 23/02/2026 10:20:19
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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 Pubblicato: 26/02/2026 12:23:13
Tomas Novotny

Tomas Novotny

1 apprezzamenti e 1 disapprezzamenti in 15 post.

Gruppo: 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 KiB) scaricato 653 volta(e).

Tomáš
1 utenti hanno apprezzato questo post
Martin Kraska 26/02/2026 16:32:09
#19 Pubblicato: 26/02/2026 16:31:44
Martin Kraska

Martin Kraska

1.361 apprezzamenti in 2.275 post.

Gruppo: 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
  • Nuovi post
  • Nessun nuovo post