# Release 1.12.3 build 151 added post processing "Slice Plot" option

8 messages
Open this post in threaded view
|

## Release 1.12.3 build 151 added post processing "Slice Plot" option

Open this post in threaded view
|

## Re: Release 1.12.3 build 151 added post processing "Slice Plot" option

 Administrator Thanks for the feedback, please find my comments below: randress wrote 3. The Slice Plot specification form and the resultant plot window have the same name. Could these be changed? You can manually change it by first clicking on the slice plot figure (so that it is selected/active) and execute the command:  set( gcf, 'Name', 'My_Figure_Label' ) % gcf ~ get current figure handle  randress wrote The axes are not labeled. I'm not sure it would be meaningful as general slice with a normal not corresponding to an axis direction will result in a local coordinate system, and labeling as "x/y" would then probably be confusing (as it has nothing to do with the "real" x/y axes). You can of course manually add labels if you should like with the Matlab "xlabel" and "ylabel" commands. randress wrote 4. The plot title, at least at times, seems to be formed by appending any existing 3D slice plot title to the selected "Slice Plot" option. Is this what is intended? That is a bug from reusing the plot options, thanks. randress wrote 5. On one example (below) there is a stray geometry line in the plot.  This line appears in the 3D plot space also. Perhaps it is a flaw in my geometry. See my previous answers on this issue. randress wrote 7. Unlike the surface plot, the Iso Contour plot does not have a "Range" field that could be use to select the range of values to be plotted. Could this be added? I have not felt this was particularly necessary as you can manually specify contour levels as an expression that evaluates to a vector like ( "[0, 0.1, 0.3, 0.4, 1.0]", "0:0.1:0.5", or "linspace/logspace(0,0.5,5)" ). randress wrote 8. On the Slice Plot selection screen, the Surface Plot setting seems to persist between closing and opening the screen. Yet, on the Iso Contour plot the expression to be plotted, the number of Contour levels, and the Colormap settings return to default. I would expect that this can be changed in a future release. As it probably expected the slice plot dialog box just is a "clone" of the main plot dialog box, and inherits the settings from it but does not save its own settings (if you enable and define and arrow plot in the main postprocessing settings dialog box it will show up in the slice dialog box as well, but not vice versa). randress wrote 9. Finally, there are a few item that might be helpful if added to the Slice Plot window itself (the window that contains the actual plot): a) the ability to zoom in and out , b) to pan (slide the plot within the plot window) c) to hover over points plotted (or lines plotted) to see the coordinates and the value represented by the point (or line). Can any of these be added in a future release? Yes, this is a good idea. By default I typically disable all toolbars for figures for a cleaner look. You can manually enable them again by first clicking on the slice plot figure (so that it is selected/active) and execute the command:  set( gcf, 'Toolbar', 'figure' ) 
Open this post in threaded view
|

## Re: Release 1.12.3 build 151 added post processing "Slice Plot" option

 Precise Simulation wrote randress wrote 3. The Slice Plot specification form and the resultant plot window have the same name. Could these be changed? You can manually change it by first clicking on the slice plot figure (so that it is selected/active) and execute the command:  set( gcf, 'Name', 'My_Figure_Label' ) % gcf ~ get current figure handle  Thanks. This works fine. Normally this would not be a problem, but with the small screen I am dealing with (laptop) I cannot move the Slice Plot settings window out to vacant real estate, so it goes hidden behind all the rest of the world.  To find it I have to hover the mouse over the MATLAB icon in the Windows taskbar to see all the MATLAB windows ... and I see two that have the same name "Slice Plot" ... so I have to guess which is the one I want ... and I suppose I am about 50%. Precise Simulation wrote randress wrote The axes are not labeled. I'm not sure it would be meaningful as general slice with a normal not corresponding to an axis direction will result in a local coordinate system, and labeling as "x/y" would then probably be confusing (as it has nothing to do with the "real" x/y axes). You can of course manually add labels if you should like with the Matlab "xlabel" and "ylabel" commands. Ahh... I didn't think of that... I agree.  I can add them if mine are orthogonal. Precise Simulation wrote randress wrote 7. Unlike the surface plot, the Iso Contour plot does not have a "Range" field that could be use to select the range of values to be plotted. Could this be added? I have not felt this was particularly necessary as you can manually specify contour levels as an expression that evaluates to a vector like ( "[0, 0.1, 0.3, 0.4, 1.0]", "0:0.1:0.5", or "linspace/logspace(0,0.5,5)" ). I agree. This is not the first time that my unfamiliarity with MATABese encourages me to seek a more conventional solution.  I need to drill this one (vector creation tricks) into my brain! Precise Simulation wrote randress wrote 8. On the Slice Plot selection screen, the Surface Plot setting seems to persist between closing and opening the screen. Yet, on the Iso Contour plot the expression to be plotted, the number of Contour levels, and the Colormap settings return to default. I would expect that this can be changed in a future release. As it probably expected the slice plot dialog box just is a "clone" of the main plot dialog box, and inherits the settings from it but does not save its own settings (if you enable and define and arrow plot in the main postprocessing settings dialog box it will show up in the slice dialog box as well, but not vice versa). Ok. That helps. Precise Simulation wrote randress wrote 9. Finally, there are a few item that might be helpful if added to the Slice Plot window itself (the window that contains the actual plot): a) the ability to zoom in and out , b) to pan (slide the plot within the plot window) c) to hover over points plotted (or lines plotted) to see the coordinates and the value represented by the point (or line). Can any of these be added in a future release? Yes, this is a good idea. By default I typically disable all toolbars for figures for a cleaner look. You can manually enable them again by first clicking on the slice plot figure (so that it is selected/active) and execute the command:  set( gcf, 'Toolbar', 'figure' )  I am having a bit of an issue with this one ... the added Toolbar is absent the +/-, pan, and rotate buttons that appear on the other postprocessing plots.  However, when I add the MenuBar also, ... >> set( gcf, 'Name', 'The Slice Plot Figure', 'ToolBar', 'figure', 'MenuBar', 'figure' ) ...the Tools menu provides these, which is quite suitable. Thanks and kind regards, Randal
Open this post in threaded view
|

## Re: Release 1.12.3 build 151 added post processing "Slice Plot" option

 In reply to this post by Precise Simulation **** Build 157 Update **** Nice job fixing and enhancing the "Slice Plot" capability. Let's see how many I can spot: randress wrote 3. The Slice Plot specification form and the resultant plot window have the same name. Could these be changed? Corrected with naming of "Slice Plot Settings". randress wrote 4. The plot title, at least at times, seems to be formed by appending any existing 3D slice plot title to the selected "Slice Plot" option. Is this what is intended? Bug corrected. randress wrote 5. On one example (below) there is a stray geometry line in the plot.  This line appears in the 3D plot space also. Perhaps it is a flaw in my geometry. Evidently corrected. See forum post under "Technical Issues", "v_merge Error and unexpected line in model" randress wrote 8. On the Slice Plot selection screen, the Surface Plot setting seems to persist between closing and opening the screen. Yet, on the Iso Contour plot the expression to be plotted, the number of Contour levels, and the Colormap settings return to default. I would expect that this can be changed in a future release. Something seems to be different here as well. I am seeing some persistence. Is this feature added as well? randress wrote 9. Finally, there are a few item that might be helpful if added to the Slice Plot window itself (the window that contains the actual plot): a) the ability to zoom in and out , b) to pan (slide the plot within the plot window) c) to hover over points plotted (or lines plotted) to see the coordinates and the value represented by the point (or line). Can any of these be added in a future release? All done! .... except for possibly the last part of c) "and the value".   I'm having trouble getting the value to be displayed even though replacing/modifying the datatip function with: userdatatip.m...but I can't find the UserData... get(event_obj.Target, 'UserData' ), ... % nothing returnd for UserData HOWEVER, I see that it IS output to the FEATool Command Log window: Expression __var_1 at (0.6674,0.7086) = 0.215337 Nice Job! What have I missed? -Randal
Open this post in threaded view
|

## Re: Release 1.12.3 build 151 added post processing "Slice Plot" option

 Administrator randress wrote I'm having trouble getting the value to be displayed even though replacing/modifying the datatip function It is to my knowledge only possible to use the datatip hover functionality for pure contour/line plots, if you have/add surface plots this will not be possible. If you want to pursue this I would suggest you check with the Mathworks if they know a way to make it possible. randress wrote ...but I can't find the UserData... get(event_obj.Target, 'UserData' ), ... % nothing returnd for UserData  The "UserData" field is only set for the contour line plot objects and otherwise not used and therefore empty. randress wrote However, I see that it IS output to the FEATool Command Log window: Expression __var_1 at (0.6674,0.7086) = 0.215337  The 2D surface plot sets a "ButtonDownFcn" callback on the corresponding patch graphics objects to evaluate the currently plotted function at the clicked point (by using the evalexpr function).
Open this post in threaded view
|

## Re: Release 1.12.3 build 151 added post processing "Slice Plot" option

 Precise Simulation wrote It is to my knowledge only possible to use the datatip hover functionality for pure contour/line plots, if you have/add surface plots this will not be possible. If you want to pursue this I would suggest you check with the Mathworks if they know a way to make it possible. ..... The "UserData" field is only set for the contour line plot objects and otherwise not used and therefore empty. That explains it.  I was only plotting "surface".  If I slice plot only Iso: ...or Iso and Surface: I am able to use my datatip function that displays "UserData"! Now I am faced with a question about the colorbar: When both Iso & Surface are plotted, does the color bar apply to the Iso/contour plot or to the Surface plot? Kind regards, Randal