X-Y Plot Region

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

#541 Publicado: 17/9/2024 22:39:15
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Wrote

thanks uni , it's so convenient to set properties for figures now ,
i wil attach my usage for late-comers to reference .
i decide to make it be a snippet , whenever there is a xyplot i'll insert this snippet


Greetings,

With regards to the list of properties you created, I have some updates to your "Legend"
  • (...).Legend.TextColor
  • (...).Legend.LegendBackColor
  • (...).Legend.LegendBorderColor
  • (...).Legend.LegendPosition
  • (...).Legend.LegendFont

Please take note of the last one as I couldn't get 'position' to work, but 'legendPosition' did provide values. Please note: I am running an older version.

I also believe you are missing 「(...).Grid.IsY2Grid」, which would control drawing the gridlines per the Y2 Axis.

May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#542 Publicado: 18/9/2024 20:21:22
Martin Kraska

Martin Kraska

1.361 me gusta en 2.275 mensajes.

Grupo: Moderator

Wrote

As an experiment, I may add this feature.

xyplot-description-properties.PNG



I guess you propose to read the settings from the description. I'd like this feature very much, yet, how to include calculated values?
I'd also propose a Hotkey or context menu item to send the current settings to the description as a template
Technische Mechanik mit SMath Studio: https://link.springer.com/book/10.1007/978-3-658-50592-9
#543 Publicado: 18/9/2024 21:04:21
⚜ Kenny Lemens, P.E. ᵂᴵ

⚜ Kenny Lemens, P.E. ᵂᴵ

85 me gusta en 181 mensajes.

Grupo: User

Greetings,

I like the thought of declaring such settings in the description field, but I would recommend against it. There will be several issues with such an implementation:
  • There is a discrepancy between special/encoded characters, may need to manually paste text in for best affect.
  • This area doesn't provide the best Copy/Paste experience.
  • There is no dynamic assist when typing variables.
  • Easy to overlook the description field, may create frustration if person isn't aware that the description is declaring settings.


Instead, I would recommend placement of these settings into the input; since setprop() has a Global influence there is no issue with this placement:
SMath_SetProp()_Placement.gif


May this be of Good Help;
⚜ Kenny Lemens, P.E. ᵂᴵ
"No matter where you go, there you are." -Buckaroo BanzaiHotkeys: https://en.smath.com/forum/resource.ashx?a=45771&b=2
#544 Publicado: 19/9/2024 22:38:16
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

A single quote can be used instead of or together with a period.

xyplot-description-properties-with-single-quote.png

Other symbols are also available:


XYPlot#XAxis#XMin:x.min
XYPlot%XAxis%XMin:x.min
XYPlot~XAxis~XMin:x.min
Russia ☭ forever, Viacheslav N. Mezentsev
#545 Publicado: 26/9/2024 2:30:07
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

SMath Studio compatibility

Plugin updated.

Changes:

- added support for image drawing;
- added support for settings inside the description.

I haven't decided yet how to describe the set of properties in the description. We need to experiment a little.
I can try to display the picture from the document if it is marked with tag

Click to enlarge Click to enlarge

xyplot-drawimage.sm (8,99 KiB) descargado 1705 vez(es).
xyplot-drawimage.pdf (28,57 KiB) descargado 833 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
A 2 usuarios les gustó este mensaje
Alvaro 26/9/2024 4:30:00, Davide Carpi 26/9/2024 18:55:00
#546 Publicado: 26/9/2024 4:55:47
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Wrote

...
- added support for image drawing; ...



Hi Viacheslav. Thanks, it works fine. One question: Is there a way to use the RGB matrix of the image, instead of the file?

Best regards.
Alvaro.
#547 Publicado: 26/9/2024 5:31:57
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Yes, this is possible, I will add this feature in the next update.

Citar

I can try to display the picture from the document if it is marked with tag



Something like this

xyplot-drawimage-from-region.jpg
Russia ☭ forever, Viacheslav N. Mezentsev
A 2 usuarios les gustó este mensaje
Alvaro 26/9/2024 12:58:00, Davide Carpi 26/9/2024 18:54:00
#548 Publicado: 27/9/2024 4:01:00
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Soon ... more bugs added

The release manager is down again, so just an announcement.

It is also possible to draw svg icon sets (favicon, …), but I have not yet decided how to encode them.

Click to enlarge Click to enlarge Click to enlarge

xyplot-drawimage-file.pdf (38,33 KiB) descargado 870 vez(es).
xyplot-drawimage-tag.pdf (39,71 KiB) descargado 910 vez(es).
xyplot-drawimage-mat.pdf (41,61 KiB) descargado 876 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
#549 Publicado: 30/9/2024 23:38:33
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

SMath Studio compatibility

Plugin updated.

Changes:

- added support for image output (file, tag, mat);
- the oldest method of changing component properties has been removed;
- fixed support for setting properties in the component description;
- minor improvements.

xyplot-drawimage-tag.png

xyplot-drawimage-file.sm (7,89 KiB) descargado 1830 vez(es).
xyplot-drawimage-tag.sm (67,14 KiB) descargado 1880 vez(es).
xyplot-drawimage-mat.sm (8,45 KiB) descargado 1840 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
A 2 usuarios les gustó este mensaje
Alvaro 1/10/2024 9:22:00, churichuro 1/10/2024 6:08:00
#550 Publicado: 1/10/2024 9:41:03
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Wrote

... Plugin updated.
- added support for image output (file, tag, mat); ...



Hi Viacheslav. About 'mat' method, I can't read an image with READRGB, and with image2rgb I don't know how to plot it as RGB (the matrix output from image2rgb is always 1 row by 3 columns containing the 3 matrices R, G and B )

Best regards.
Alvaro.
#551 Publicado: 1/10/2024 13:01:38
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Only a gray image is supported now, I think about how to add RGB matrices. Functions for working with images I will fix.
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
Alvaro 1/10/2024 23:14:00
#552 Publicado: 1/10/2024 16:54:10
fedeghi

fedeghi

25 me gusta en 112 mensajes.

Grupo: User

Wrote


- the oldest method of changing component properties has been removed;



Hi Uni and fellow Smath users,
does this above imply that "setprop" is now not only the preferred way to set plot properties, but also the only one?
I still didn't study it, in case I need to make my homeworks as soon as possible since I have some tools that used the old (deprecated?) way of setting props and autoscaling plots.

Do you have an updated sample file to share, that allows to identify the new way of working with plot properties?

Thanks
#553 Publicado: 1/10/2024 17:39:21
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

It is not necessary to use the setprop() function, now you can set the component properties directly.

xyplot-set-properties-min-example.png

xyplot-set-properties-min-example.sm (10,36 KiB) descargado 1894 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
ioan92 1/10/2024 18:30:00
#554 Publicado: 1/10/2024 17:48:49
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

To avoid editing documents, you can try this method. But you need to set a value for the Name property of the component.

xyplot-set-properties-support-old-style.png

xyplot-set-properties-support-old-style.sm (6,26 KiB) descargado 1830 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
ioan92 1/10/2024 18:30:00
#555 Publicado: 1/10/2024 18:23:18
fedeghi

fedeghi

25 me gusta en 112 mensajes.

Grupo: User

Thanks for this quick recap!
#556 Publicado: 1/10/2024 20:46:39
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

I can't build a fixed MathcadToolbox plugin. When it becomes possible, I will release a new version.

Click to enlarge

xyplot-drawimage-mat-rgb.pdf (86,51 KiB) descargado 851 vez(es).
xyplot-drawimage-mat-rgb.sm (18,24 KiB) descargado 1799 vez(es).
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
Alvaro 1/10/2024 23:15:00
#557 Publicado: 1/10/2024 23:03:39
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

SMath Studio compatibility

Plugin updated.

Changes:

- added support for rgb image drawing;
- the priority of setting properties has been changed (description - first).

Now the settings from the description are applied first and the settings from the document are applied second. This is done because it is much more difficult to edit the component description than the document itself. If the description is hidden, the properties present there can be overwritten using the settings from the document. Otherwise, as shown above, implicitly changing the properties can become a problem.

Later I will add the ability to copy property sets to a document from the settings form.

Still no fixed features from the MathcadToolbox plugin (READRGB(), ...).
Russia ☭ forever, Viacheslav N. Mezentsev
A 2 usuarios les gustó este mensaje
sergio 1/10/2024 23:13:00, Alvaro 2/10/2024 23:29:00
#558 Publicado: 2/10/2024 1:59:22
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

I think it is possible to draw a line of text in a similar way. The interface for such a call should also be consistent with the general approach for shapes.
Russia ☭ forever, Viacheslav N. Mezentsev
#559 Publicado: 2/10/2024 23:38:55
Alvaro

Alvaro

1.139 me gusta en 1.805 mensajes.

Grupo: User

Hi Viacheslav.

It would be very interesting to be able to obtain the RGB matrix of the image within the Mathcad region, perhaps you can incorporate that option in READIMG(#uni), READ_RED(#uni), ... etc. of the Mathcad toolbox plugin. Not only would it serve to avoid having to attach an external file, but it would also be a way to preserve the changes within the image (those that can be made with the mouse after selecting the "edit" option).

It would also be very useful to have a function similar to Matlab's ginput, such as [X Y]:=XYInput("plot",n) returning two X,Y vectors with n components. The trigger for the action of choosing points could be from the context menu by right clicking on the XYPlot or in some similar way.

Best regards.
#560 Publicado: 3/10/2024 1:17:31
Вячеслав Мезенцев

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

1.558 me gusta en 1.868 mensajes.

Grupo: Moderator

Wrote

It would be very interesting to be able to obtain the RGB matrix of the image within the Mathcad region, perhaps you can incorporate that option in READIMG(#uni), READ_RED(#uni), ... etc. of the Mathcad toolbox plugin. Not only would it serve to avoid having to attach an external file, but it would also be a way to preserve the changes within the image (those that can be made with the mouse after selecting the "edit" option).


I didn't do it right away because the images form very large matrices. Regular functions don't have access to the sheet area and the list of components, so it can't be done directly. But there is a way to do it differently. We can reread the document itself manually and parse it. I've done this before. So, I think it will be possible to add new functionality to the image handling functions, but only where I am a developer. It should work where there will be read access to the document itself.

Wrote

It would also be very useful to have a function similar to Matlab's ginput, such as [X Y]:=XYInput("plot",n) returning two X,Y vectors with n components. The trigger for the action of choosing points could be from the context menu by right clicking on the XYPlot or in some similar way.


As for entering a list of points, this is also possible. I'll even say more, I had thoughts of adding horizontal and vertical markers in any quantity. It's not difficult to draw them, the problem is in outputting information from them to the document. We need to figure out how to do it beautifully and universally.

Click to enlarge
Russia ☭ forever, Viacheslav N. Mezentsev
A 1 usuarios les gustó este mensaje
Alvaro 3/10/2024 21:50:00
  • Nuevos mensajes
  • Sin mensajes nuevos