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

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Vijay  
#1 Posted : 17 May 2018 16:33:12(UTC)
Vijay


Rank: Member

Groups: Registered
Joined: 15/03/2018(UTC)
Posts: 23
Canada
Location: Hamilton

Was thanked: 1 time(s) in 1 post(s)
Hi All,

I have created a plot in Smath but want to change the x axis to a log scale. Any ideas on how to go about doing that. Attached is my file. filter.sm (7kb) downloaded 48 time(s).

Regards,
Vijay Khatri

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

Offline Jean Giraud  
#2 Posted : 18 May 2018 00:07:22(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Vijay Go to Quoted Post
I have created a plot in Smath but want to change the x axis to a log scale


What would that do transforming the visible into invisible ?
What about some Fourier spectrum suite after freaking the 'f' ?

filter.sm (13kb) downloaded 63 time(s).
Offline Vijay  
#3 Posted : 18 May 2018 00:42:31(UTC)
Vijay


Rank: Member

Groups: Registered
Joined: 15/03/2018(UTC)
Posts: 23
Canada
Location: Hamilton

Was thanked: 1 time(s) in 1 post(s)
Well!!!, I am trying to do a Bode Plot. The example I am working on is a filter transfer function. Hope you can see where I am coming from. Once that's sorted out, I have to come up with the phase plot.

Vijay

Offline Jean Giraud  
#4 Posted : 18 May 2018 05:44:51(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Vijay Go to Quoted Post
Well!!!, I am trying to do a Bode Plot. The example I am working on is a filter transfer function. Hope you can see where I am coming from. Once that's sorted out, I have to come up with the phase plot.

Bode plot on log scale X is valid for high frequencies. For low 'f' as you have,
it would rather be confusing [my opinion from years back]. On the other hand,
since around 1980, almost all systems were Digital rather than Analog.
Do you have to move a cannon rapidly, left/right ... ?
I'm more versed in Process Control & Instrumentation.
Some interesting reading attached.
Maybe latest version of Maxima has X log scale ?
Martin is the person to confirm/infirm X log scale.
Just plot the Phase as is straight, will be good enough.

Fourier BoxCar_0.sm (38kb) downloaded 62 time(s).
Fourier BoxCar_1.sm (20kb) downloaded 58 time(s).
Inst_PID [MCD Model].sm (178kb) downloaded 70 time(s).


Offline alyles  
#5 Posted : 18 May 2018 14:05:11(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Originally Posted by: Vijay Go to Quoted Post
Hi All,

I have created a plot in Smath but want to change the x axis to a log scale. Any ideas on how to go about doing that. Attached is my file. filter.sm (7kb) downloaded 48 time(s).

Regards,
Vijay Khatri


To answer your question, I don't believe there is a way to do it with the default plotting tool. You can, however, use a plugin like Zed Graph to draw log plots. There are a lot more settings and it's a bit of a manual process, but once it's setup the way you like it looks great. See attached.

filter.sm (100kb) downloaded 139 time(s).
Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Vijay  
#6 Posted : 18 May 2018 15:00:10(UTC)
Vijay


Rank: Member

Groups: Registered
Joined: 15/03/2018(UTC)
Posts: 23
Canada
Location: Hamilton

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: Jean Giraud Go to Quoted Post
Originally Posted by: Vijay Go to Quoted Post
Well!!!, I am trying to do a Bode Plot. The example I am working on is a filter transfer function. Hope you can see where I am coming from. Once that's sorted out, I have to come up with the phase plot.

Bode plot on log scale X is valid for high frequencies. For low 'f' as you have,
it would rather be confusing [my opinion from years back]. On the other hand,
since around 1980, almost all systems were Digital rather than Analog.
Do you have to move a cannon rapidly, left/right ... ?
I'm more versed in Process Control & Instrumentation.
Some interesting reading attached.
Maybe latest version of Maxima has X log scale ?
Martin is the person to confirm/infirm X log scale.
Just plot the Phase as is straight, will be good enough.

Fourier BoxCar_0.sm (38kb) downloaded 62 time(s).
Fourier BoxCar_1.sm (20kb) downloaded 58 time(s).
Inst_PID [MCD Model].sm (178kb) downloaded 70 time(s).




This is true in the instrumentation world, however, in the power world (Power Systems), there is no scope of digitisation when it comes to filters. Majority of the filters are passive due to very high voltage and current requirements. Your instrumentation example if very interesting, I will explore that further.

Vijay
Offline Vijay  
#7 Posted : 18 May 2018 15:04:08(UTC)
Vijay


Rank: Member

Groups: Registered
Joined: 15/03/2018(UTC)
Posts: 23
Canada
Location: Hamilton

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: alyles Go to Quoted Post
Originally Posted by: Vijay Go to Quoted Post
Hi All,

I have created a plot in Smath but want to change the x axis to a log scale. Any ideas on how to go about doing that. Attached is my file. filter.sm (7kb) downloaded 48 time(s).

Regards,
Vijay Khatri


To answer your question, I don't believe there is a way to do it with the default plotting tool. You can, however, use a plugin like Zed Graph to draw log plots. There are a lot more settings and it's a bit of a manual process, but once it's setup the way you like it looks great. See attached.

filter.sm (100kb) downloaded 139 time(s).


Thank you that really helps. Just a few questions, I need to duplicate the steps you took as I have to instruct my students to do the same.
How did you add the plug in (IN the example you provided, it prompted me to install the plug in). Also, do you invoke Maple plot, I tied that but did not work for me.

Vijay
Offline alyles  
#8 Posted : 18 May 2018 15:30:56(UTC)
alyles


Rank: Advanced Member

Groups: Registered
Joined: 23/03/2016(UTC)
Posts: 275
United States

Was thanked: 91 time(s) in 57 post(s)
Originally Posted by: Vijay Go to Quoted Post


Thank you that really helps. Just a few questions, I need to duplicate the steps you took as I have to instruct my students to do the same.
How did you add the plug in (IN the example you provided, it prompted me to install the plug in). Also, do you invoke Maple plot, I tied that but did not work for me.

Vijay




To install the plugin go to Tools->Plugins. Where it says "Local Storage" click and choose "Online Gallery". Then scroll to find ZedGraph region and double click to install. Note: since you now have the ZedGraph region installed you will find it under "Local Storage".

To invoke the graph choose Insert->ZedGraph Region.

There are many setting that can be accessed by double clicking the region or Right Click -> Format.

I changed to log scale by accessing XAxis->Type and choosing Log. There were a lot of other settings I messed with to make it look like I did in the example, but I can't remember them exactly. Best method is just to play around.

Edit: I do remember changing the number of points from 100 to 1000 in order to get the resolution I wanted. At my first attempt the resonant peak only maxed out at around 30, but it was do to the number of points being to little.

There may be other ways to do this using Maple Plot, Maxima Draw2D or perhaps XY Plot, but I'm not entirely sure. I don't often plot data, but this is the way I'm most familiar with.

Edited by user 18 May 2018 15:34:15(UTC)  | Reason: Not specified

Feel free to join the SMath Studio Users Discord Channel: https://discord.gg/PayZpJW
Offline Jean Giraud  
#9 Posted : 18 May 2018 17:26:36(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: alyles Go to Quoted Post
To answer your question, I don't believe there is a way to do it with the default plotting tool. You can, however, use a plugin like Zed Graph to draw log plots. There are a lot more settings and it's a bit of a manual process, but once it's setup the way you like it looks great. See attached.

Thanks alyles, I love your Grand Discours, easy to follow.
The logplot is just the same as linear plot, except for the tick labels log disposed.
Most interesting, like this:
My 6179 does not come with ZedGraph, but it installed itself from opening
a work sheet that had it [from recollection Collab NDTMA version 6484].
In fact, when I open your work sheet and say YES => continue, ZedGraph is red
and few more plugins.

Long time ago, I experimented Maple plot ... happy at the construction stage,
but returned dead next session, next day ... for the birds.

I don't tell lies !

Jean

ZedGraph.PNG


Offline Jean Giraud  
#10 Posted : 18 May 2018 17:54:19(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
... eventually, it may install Zedgraph ?

Project filter (1).sm (102kb) downloaded 97 time(s).
Offline Vijay  
#11 Posted : 19 May 2018 04:11:52(UTC)
Vijay


Rank: Member

Groups: Registered
Joined: 15/03/2018(UTC)
Posts: 23
Canada
Location: Hamilton

Was thanked: 1 time(s) in 1 post(s)
Originally Posted by: alyles Go to Quoted Post
Originally Posted by: Vijay Go to Quoted Post


Thank you that really helps. Just a few questions, I need to duplicate the steps you took as I have to instruct my students to do the same.
How did you add the plug in (IN the example you provided, it prompted me to install the plug in). Also, do you invoke Maple plot, I tied that but did not work for me.

Vijay




To install the plugin go to Tools->Plugins. Where it says "Local Storage" click and choose "Online Gallery". Then scroll to find ZedGraph region and double click to install. Note: since you now have the ZedGraph region installed you will find it under "Local Storage".

To invoke the graph choose Insert->ZedGraph Region.

There are many setting that can be accessed by double clicking the region or Right Click -> Format.

I changed to log scale by accessing XAxis->Type and choosing Log. There were a lot of other settings I messed with to make it look like I did in the example, but I can't remember them exactly. Best method is just to play around.

Edit: I do remember changing the number of points from 100 to 1000 in order to get the resolution I wanted. At my first attempt the resonant peak only maxed out at around 30, but it was do to the number of points being to little.

There may be other ways to do this using Maple Plot, Maxima Draw2D or perhaps XY Plot, but I'm not entirely sure. I don't often plot data, but this is the way I'm most familiar with.


Thank you
Offline Jean Giraud  
#12 Posted : 22 May 2018 17:01:30(UTC)
Jean Giraud

Rank: Guest

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

Was thanked: 980 time(s) in 808 post(s)
Originally Posted by: Vijay Go to Quoted Post
There may be other ways to do this using Maple Plot, Maxima Draw2D or perhaps XY Plot, but I'm not entirely sure. I don't often plot data, but this is the way I'm most familiar with.


Please, visit: Admittance Bode for the X log plot.
Observe no bloody units !
Users browsing this topic
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.