X-Y Plot Region

X-Y Plot Region - Extends SMath Studio with a X-Y Plot Region. - Messages

#421 Posted: 1/30/2021 11:15:14 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

1 Isolated M.sm (81 KiB) downloaded 38 time(s).
#422 Posted: 1/31/2021 1:02:27 AM
netsonicyxf

netsonicyxf

2 likes in 79 posts.

Group: User

Wrote



1.png
all the math regions shows black.
How do you isolate M?
#423 Posted: 1/31/2021 2:14:23 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

Why X-Y plot can't polt this, while plot 2D can?



Hi. In your case use eval() as in the image. After that XY plot works.

Clipboard01.jpg

Best regards.
Alvaro.

#424 Posted: 1/31/2021 3:15:44 AM
netsonicyxf

netsonicyxf

2 likes in 79 posts.

Group: User

Wrote

Wrote

Why X-Y plot can't polt this, while plot 2D can?



Hi. In your case use eval() as in the image. After that XY plot works.

Clipboard01.jpg

Best regards.
Alvaro.



This works for me, Thank you.
#425 Posted: 1/31/2021 8:23:48 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

all the math regions shows black.
How do you isolate M?


all black ... select all, background white.
Spool to file is most precious in many applications... here disabled.

M.PNG
#426 Posted: 2/1/2021 5:49:18 AM
sergio

sergio

115 likes in 329 posts.

Group: User

In fact it is a behavior that I did not expect. I noticed that you defined "M" symbolically. But it wasn't enough. With "eval" it works but I don't understand why

sergio
SMathStudio_Desktop_VmhaoIqnkM.png
#427 Posted: 2/1/2021 6:10:14 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

The problem is that the component is trying to determine the type of the expression and it doesn't do it correctly. This case has not yet been investigated by me. The return type is determined without evaluating the expression. When we forcibly evaluate an expression the component correctly recognizes its type.
I will try to expand the type of expressions supported.
Russia ☭ forever, Viacheslav N. Mezentsev
#428 Posted: 2/1/2021 6:14:38 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

In fact it is a behavior that I did not expect. I noticed that you defined "M" symbolically. But it wasn't enough. With "eval" it works but I don't understand why

sergio



Hi Sergio. My interpretation, but not sure if it's actually the reason why. I think in terms of the Mathematica's Hold[x] instruction, or the equivalent Maple quoting with 'x'; those instructions make x remain unevaluated. In a mathematica procedure f(x), if previously you have x:=2 and call f[Hold[x+3]], f receive 'x+3' but not 5. SMath try to preserve all things unevaluated for make symbolic simplifications in cases of mixing symbolic and numeric calculations. For this is that XY plot and vectorize() function receive arguments unevaluated. In that sense eval() is the opposite to hold(), function that actually I ask for as feature suggestion.

The best example of that hold exists in SMath is the way that derivatives are evaluated, like in mathcad: you first define x:=2, then call diff(x^3,x) = 12. Notice that diff() don't receive 8 and 2 as arguments, but x^3 and x, just because you cant differentiate with something like diff(8,2). So, some functions in SMath gets it's arguments with 'hold', and it seems that vectorize() is another example, but others not.

Even that, also there are some other internals with an strange behavior for all functions: if you think that you write a function which goes to receive a big matrix as argument M, your first step in the body procedure must to be M:=M for ensure that it goes to be only numerical. Ndtma expose that in an example, but can't remember nor find where.

Best regards.
Alvaro.
1 users liked this post
sergio 2/1/2021 11:38:00 AM
#429 Posted: 2/1/2021 6:31:47 AM
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 likes in 1674 posts.

Group: User

Wrote

... This case has not yet been investigated by me. ...



Hi Viacheslav: Just pay attention to the error message in the other post of the user with vectorize(): "t - not defined". This t is under an integral symbol. M remains unevaluated because depends on a numeric integral, which SMath try to retain unevaulated how long as can for avoid truncation errors in the same way that SMath do with pi or sqrt(2). So, if vectorize() can't deal with the numerical integral, I guess that it could be better to improve the general SMath way to determine when use the numeric value for all expressions and when retain the procedimental definition.

I guess that a way for uniformize SMath behaviors could be given checking Unknows() and IsDefined() procedures that not always agree for all expressions, and define some kind of standard way to check types in SMath. (I remember a post and a function plugin with a GetType() function too)

Best regards.
Alvaro.
1 users liked this post
sergio 2/1/2021 11:52:00 AM
#430 Posted: 2/1/2021 9:48:55 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

"eval" it works but I don't understand why sergio


eval("expression") -
Converts the given expression from symbolic to numeric notation.

Being a function evaluation, it assigns to same name or another name.
Thus, by same token isolates and that's what X_Y wants, it wants its
own stuff [data, f(x), f(x,y) as 'f' for contour]
Within a for loop, it has the virtue of isolating internally
within the loop itself, then accelerates the for loop result.
It has the same effect as spooling to file, not confirmed Bible,
just from observation(s) ... forgive my Grand Discours made short.
Some functions that have only numeric parameters must be redefined
via the eval(,) to convert scalar 'x' for plotting on Quick plot @.
For instance: the Hypergeometric Gamma
Cheers ... Jean
1 users liked this post
sergio 2/1/2021 11:52:00 AM
#431 Posted: 2/22/2021 7:41:54 AM
fedeghi

fedeghi

25 likes in 112 posts.

Group: User

Hi, I was reading some old discussions about graphs plugin.. I ran into some posts anticipating the development of "setprop" command for X-Y Plot Region.
Is it in beta or is it released (I see it is available in the function lists, but I didn't understand if it is fully developed or still work in progress..)?
In case, does anybody have some examples of which parameters can be set and how? I mean, some guideline about syntax to be used?
Thanks

Bye
#432 Posted: 2/22/2021 11:10:47 AM
Вячеслав Мезенцев

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

1402 likes in 1708 posts.

Group: Moderator

This function works partially and does not completely cover the component (you can't change the properties of the curve with it). I do not recommend using it everywhere, because I am planning a more direct control mechanism.

You can find a usage example here and here.
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Jason McCool 2/22/2021 11:13:00 AM
#433 Posted: 2/22/2021 12:41:35 PM
fedeghi

fedeghi

25 likes in 112 posts.

Group: User

Ok uni, thanks for feedback.
I will follow your suggestion and wait for the new control method instead.
#434 Posted: 4/28/2021 10:01:50 PM
German

German

0 likes in 8 posts.

Group: User

Hi, there is way to ratote the X axes values?
#435 Posted: 4/29/2021 2:55:36 AM
Martin_B

Martin_B

21 likes in 84 posts.

Group: User

You can set the maximum value on the x axis lower then the minimum value. Is that what you want to achieve?
But then the vertical grid lines are not adjusted correctly.
#436 Posted: 4/29/2021 8:43:35 AM
German

German

0 likes in 8 posts.

Group: User

Wrote

You can set the maximum value on the x axis lower then the minimum value. Is that what you want to achieve?
But then the vertical grid lines are not adjusted correctly.


No, that didn't work.




I need to change the orientation of the text in x axes.

#437 Posted: 4/29/2021 10:00:44 AM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Wrote

Hi, there is way to rotate the X axes values ?


You can rotate ...
1. A discretized function [2 cols]
2. A drawing in 2 cols
3. Smath 3 D CreateMesh
4. RGB matrix
5. plot ortho on isometric X_Y plot

Isometric.PNG
#438 Posted: 4/29/2021 5:50:13 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Wrote

Hi, there is way to ratote the X axes values?



I think it is about rotating the tick labels on the x axis such that they don't overlap.

Unfortunately this is not possible, at least not exposed to the settings interface.

You could, however, change number format and tick spacing to mitigate the problem.

If the maxima plugin is an option for you, then you can use the draw library.

Blatt1.png
Blatt1.sm (14 KiB) downloaded 38 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#439 Posted: 5/3/2021 6:29:22 PM
German

German

0 likes in 8 posts.

Group: User

Wrote

Wrote

Hi, there is way to ratote the X axes values?



I think it is about rotating the tick labels on the x axis such that they don't overlap.

Unfortunately this is not possible, at least not exposed to the settings interface.

You could, however, change number format and tick spacing to mitigate the problem.

If the maxima plugin is an option for you, then you can use the draw library.

Blatt1.png
Blatt1.sm (14 KiB) downloaded 38 time(s).



That is exactly what I need.

I tried before doing what you suggest but i need them in a determine spacing and they sometimes overlap.

I will try with the maxima plugin.

Viel danke.

PD: the thanks button throws me an error.
#440 Posted: 5/10/2021 1:05:01 AM
NDTM Amarasekera

NDTM Amarasekera

130 likes in 352 posts.

Group: User

Wrote

Updated my snippet for the XY Plot setprop wrappers. I have functions for each property that can be set with setprop.



In latest SS 99.7799, I experience a label error similar to image as shown.
Some previous files show this error.

XYPlot Label.png

XYPlot Label Error.png
Look within!... The secret is inside you. Best Regards Eng. NDTM Amarasekera - Sri Lanka
  • New Posts New Posts
  • No New Posts No New Posts