Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


3 Pages123>
Options
Go to last post Go to first unread
Offline Jean Giraud  
#1 Posted : 23 February 2016 21:04:23(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Hello Ioan,

Originally Posted by: ioan92 Go to Quoted Post
May I choose the lines colors by programming?


To be or not to be: that is the question

I found Maple XY plot very interesting on some aspect.
About traces colors not sure . I don't use Maple 2D plot
anymore because it does not save plot settings.
Your truss is made of lines, is it ? Could you make it
as XY vector therefore in unique color at will as you can
blind the unwanted color [black is not available in Smath].
Another option is to spool to file and recall as image,
then slide in the live results. Recall from file as image
will plot all gray scale .

Jean

thanks 1 user thanked Jean Giraud for this useful post.
on 23/02/2016(UTC)

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline frapuano  
#2 Posted : 23 February 2016 23:06:36(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
Hi Ioan

Attached a file that shows - I hope - what you want to achieve.
I have concentrated my attention on the realization of the graph without the additional points and other stuff that is easier to accomplish.

Best regards

Franco

Ioan_Plot_New.sm (15kb) downloaded 155 time(s).
thanks 1 user thanked frapuano for this useful post.
on 23/02/2016(UTC)
Offline Davide Carpi  
#3 Posted : 24 February 2016 00:07:21(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,649
Man
Italy
Location: Italy

Was thanked: 1332 time(s) in 876 post(s)
Since is not implemented in the region a way to choose the color my suggestion is to take advantage from the looping colors. Make a function with 7 arguments (1 for each standard color), in each one you can pass a list of items that you want to display with the same color. In the function store the nth element of the kth argument input in a 7*n+k place of an output system. If needed you can set the zero elements of the output system to a "far far away" point; in another function's argument you can pass the strings, or you can process more the output later in the worksheet.

Edited by user 24 February 2016 00:26:47(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 24/02/2016(UTC)
Offline Davide Carpi  
#4 Posted : 24 February 2016 00:23:14(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,649
Man
Italy
Location: Italy

Was thanked: 1332 time(s) in 876 post(s)
I cannot test it in this moment but should be the way how it works (6 or 7 colors, I have to check) Good

Edited by user 24 February 2016 00:25:14(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
Offline Jean Giraud  
#5 Posted : 24 February 2016 00:34:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
I'm interested in your ideea on transforming all idividual lines in one vector.

I didn;t visit other suggestions. I will try some of the "Matrix Treasury" to
"Unest". For indivudual color, you must keep them nested. I was more intereted
to prove the calculations update in an image. Each "T" in this example, you can
have them in all an any color from the X_Y plot. Download "ColorPic" [freeware]
then collect the RGB for quick back access.


Image Truss Valued.gif


If you want more than the truss # and its value, you will have to experiment
Davide suggestion.

Jean
thanks 1 user thanked Jean Giraud for this useful post.
on 24/02/2016(UTC)
Offline frapuano  
#6 Posted : 24 February 2016 00:38:27(UTC)
frapuano


Rank: Advanced Member

Groups: Registered
Joined: 01/08/2010(UTC)
Posts: 115
Man
Italy
Location: Rome

Was thanked: 13 time(s) in 13 post(s)
Ioan

I understand your point.
You would like do not rearrange manually the output of your program to obtain the graph ..and this is not easy to reach ...but is feasible.
The single matrix A I guess that can be obtained redesigning the output of your program to take in consideration the limitation of the X-Y graph.
In the attached file you see that I have changed Sd and that to obtain the initial result is not possible to follow the approach of putting the 2 split matrix A and B in the graph placeholder ...but is necessary to operate manually and place the matrix A in Sd .
I don't know how and if is possible to simplify the workflow and place a matrix in another matrix quickly ...unlukily I have done this manually .

Best regards

Franco

Ioan_Plot_New3.sm (22kb) downloaded 54 time(s).
thanks 1 user thanked frapuano for this useful post.
on 24/02/2016(UTC)
Offline Jean Giraud  
#7 Posted : 24 February 2016 00:39:00(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
... so, you can have the "truss valued" in image of same color as the diagram color.
You just need to save the colored image of the X_Y plot...

Jean
Offline Jean Giraud  
#8 Posted : 24 February 2016 02:12:01(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Ioan,

No problem to "un-Nest as XY vector but for plottig,
all end points have to recollected in term of their
"adjacency", no an easy task. We had an "Adjacency
Collector" in Mathcad... where is it ? will it work ?
so you don't get "parrot plot"

Jean

Forum Ioan.sm (13kb) downloaded 37 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 24/02/2016(UTC)
Offline Davide Carpi  
#9 Posted : 24 February 2016 02:19:05(UTC)
Davide Carpi


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 13/01/2012(UTC)
Posts: 2,649
Man
Italy
Location: Italy

Was thanked: 1332 time(s) in 876 post(s)
Good Good

Here a possible version of the function. I've found a bug in SMath (SS-2297), therefore I have introduced a offset parameter inside the function to move away the null values.

XYPlotGroupByColors.sm (32kb) downloaded 113 time(s).

Edited by user 24 February 2016 03:20:31(UTC)  | Reason: Not specified

If you like my plugins consider to support SMath Studio buying a plan; to offer me a coffee: paypal.me/dcprojects
thanks 1 user thanked Davide Carpi for this useful post.
on 24/02/2016(UTC)
Offline RFreund  
#10 Posted : 24 February 2016 06:02:06(UTC)
RFreund


Rank: Advanced Member

Groups: Registered
Joined: 25/09/2013(UTC)
Posts: 325
United States
Location: IL

Was thanked: 19 time(s) in 17 post(s)
Quote:
I obtain all this from another module of analysis


I'm curious how do you obtain the text (the nodal coordinates) from the analysis and transform it into text?

Thanks!
Offline Ber7  
#11 Posted : 24 February 2016 16:53:06(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
ioan92, I'm away from my computer. I'll answer later.
thanks 1 user thanked Ber7 for this useful post.
on 24/02/2016(UTC)
Offline Ber7  
#12 Posted : 24 February 2016 18:37:45(UTC)
Ber7


Rank: Advanced Member

Groups: Registered
Joined: 15/07/2010(UTC)
Posts: 437
Man
Israel
Location: Beer-Sheva

Was thanked: 520 time(s) in 288 post(s)
In my works I use this algorithm:


"Maybe you have an idea on the lines thicknesses. "No ideas. Algoritm.sm (8kb) downloaded 47 time(s).
thanks 2 users thanked Ber7 for this useful post.
on 24/02/2016(UTC),  on 26/02/2016(UTC)
Offline Jean Giraud  
#13 Posted : 24 February 2016 22:44:31(UTC)
Jean Giraud

Rank: Guest

Groups: Registered
Joined: 04/07/2015(UTC)
Posts: 6,866
Canada

Was thanked: 981 time(s) in 809 post(s)
Ioan,

The members of the truss were not in order. I have simply
ordered in trigonometric rotation, X_Y plot for any color
of your choice and line thickness .. very nice "à la carte".
Your nesting was very wise to work member by member, then
exploded in XY and scaled to render X_Y plot.
From there on: easy to rotate as per previous discussion.
Less than 1 minute to install the rotation.

Cheers, was very educative

Jean

Ioan Truss X_Y Plot.sm (13kb) downloaded 49 time(s).
thanks 1 user thanked Jean Giraud for this useful post.
on 24/02/2016(UTC)
Offline hanskl  
#14 Posted : 09 December 2020 22:21:04(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: Davide Carpi Go to Quoted Post
Good Good

Here a possible version of the function. I've found a bug in SMath (SS-2297), therefore I have introduced a offset parameter inside the function to move away the null values.

XYPlotGroupByColors.sm (32kb) downloaded 113 time(s).


Necromancer post coming up.

Has this feature been implemented in XY plot now?

Best regards,
Offline Razonar  
#15 Posted : 10 December 2020 02:03:11(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: hanskl Go to Quoted Post

Necromancer post coming up.


LOL. I needed my daughter's help to translate that.

I think that now there is not a bug, but there is an absence of a Null command, or interpreting an empty string or something similar as Null to separate lines in a graph. The Null command works as the equivalent of raising your hand in a drawing in Mathcad and Matlab and continuing the line at the next point.

In this post Friedel shows how to make monocolor a set of 2D draws: https://en.smath.com/for...D-Vector-Field-plot.aspx

Personally, I am convinced that the best plugins for plotting in SMath today are the default 2D plot and "MSChart" by Viacheslav, but I don't very well how to use it.

Clipboard01.gif

The label added editing the data under "Series/Data" menu of the plugin was lost in the saving process. I don't know how to pass to the plugin text, but it is under develop and I understand that it is in the first stages. My personal opinion is that it's the better choice for make plots in SMath, because one of the other huge advantage of MSChart is that the user makes sure that they will always be able to export the data from SMath to Excel or any other Office program and get exactly the same chart as inside SMath.

XYPlotGroupByColors Using MSChart.sm (37kb) downloaded 14 time(s).

Best regards.
Alvaro.
Offline uni  
#16 Posted : 10 December 2020 07:05:54(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,494
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
Why this method is bad?

XYPlot. Draw shapes.sm (20kb) downloaded 698 time(s).
XYPlot. Draw shapes.pdf (93kb) downloaded 533 time(s).

draw lines.png
Russia ☭ forever
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 10/12/2020(UTC)
Offline uni  
#17 Posted : 10 December 2020 07:27:27(UTC)
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,494
Man
Russian Federation

Was thanked: 1274 time(s) in 745 post(s)
This also works

draw lines.png
Russia ☭ forever
Viacheslav N. Mezentsev
Offline Razonar  
#18 Posted : 10 December 2020 07:34:19(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: uni Go to Quoted Post
Why this method is bad?


Hi. Well, I don't say "bad", but it is too elaborate. Maybe not natural to implement in a loop, and hard to export to another software like Excel. Also, having a more simple and natural structure it's easy extract the coordinates and use them in another calculus.

Here this value of 'Null forces to MSChart to flags "IsEmpty" to true (second image at bottom right). This behavior is the same than the Mathcad NaN in plots. The data structure is ... just an array n by two. Easy to construct and easy to manipulate.

Clipboard01.gif

Forcing_IsEmpty_True.gif

XYPlotGroupByColors Using MSChart.sm (44kb) downloaded 16 time(s).

Best regards.
Alvaro.

Originally Posted by: uni Go to Quoted Post
This also works

draw lines.png


Guess that's a very good solution!



Ups, I don't see that when wrote my reply

Edited by user 10 December 2020 07:37:57(UTC)  | Reason: Another answer from uni added.

thanks 1 user thanked Razonar for this useful post.
on 10/12/2020(UTC)
Offline hanskl  
#19 Posted : 10 December 2020 13:40:34(UTC)
hanskl


Rank: Advanced Member

Groups: Registered
Joined: 25/10/2017(UTC)
Posts: 158
Norway

Was thanked: 7 time(s) in 5 post(s)
Originally Posted by: Razonar Go to Quoted Post

LOL. I needed my daughter's help to translate that.


Biggrin

...

I confused X-Y plot with the built in 2D plot.

What I am looking for is a way to oraganize the colors of this truss. I want the truss in one color, the applied forces in a second color, and the reactions in a third color. Preferably I could also decide which colors to use.

Is that even possible with the built in 2D plot?

Best regards,

2D plot.PNG
Offline Razonar  
#20 Posted : 10 December 2020 15:53:45(UTC)
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,356
Uruguay

Was thanked: 815 time(s) in 516 post(s)
Originally Posted by: hanskl Go to Quoted Post

...
What I am looking for is a way to oraganize the colors of this truss. I want the truss in one color, the applied forces in a second color, and the reactions in a third color. Preferably I could also decide which colors to use.

Is that even possible with the built in 2D plot?
...


Hi. That is what Ber's method of cycling the colors does with the graphs of the arrows of the vector field and the contour lines. Here as a program for a set of polygons, I suppose it works with those of your image.

Each set of polygons can be grouped into a single matrix, and the color of the graph will then depend on what order they are placed in it.

For text annotations you can always define a specific color for them, so they can go in any order at the end.

CycleColors.pdf (59kb) downloaded 18 time(s).

CycleColors.sm (10kb) downloaded 28 time(s).

Clipboard01.gif

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 10/12/2020(UTC)
Users browsing this topic
Guest
3 Pages123>
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.