nmacsai

205 Reputation

8 Badges

3 years, 109 days

MaplePrimes Activity


These are questions asked by nmacsai

Can_I_change_the_location_of_the_color_bar_caption_in_Maple_2024.mw

In Maple 2024,

can I change the location of the color bar caption in Maple 2024? It conflicts with the color bar labels sometimes. See the attached maple sheet for an example.

Is there a shortcut in Maple that will comment out a block of highlighted code? I tried searching on Mapleprimes but everytime I search I get a page generation error.

See attached worksheet in Maple 2023.

This example is taken from the Maple help page. I want to 'zoom in' on a plot3d object. The only way I have found was from responses [1] on the maple primes forum. It uses InlinePlot and the scale option to perform the 'zoom in'. Since InlinePlot generates the plot in terms of XML there is no graphic out, only a text based output. In order to reconstitute the InlinePlot as a plot object I can view visually I need to use some additional commands from the DocumentTool package. This is all great but the output, which in our case is P3, is not a plot object and therefore cannot be exported as a png. Is there a way to convert the InlinePlot with the scaling applied back to a typical plot object so I can export it as a .png, using Export("output_plot.png",P3,base=worksheetdir)?

can_I_convert_InlinePlot(P3)_back_to_a_regular_plot_object_so_I_can_export_it_as_a_png.mw

Can I export a Table as an image like .png, where Table is defined (with DocumentTools)? See Maple worksheet for example.

Why would anyone want to do this? It all started because I wanted to include a color bar(with a specific color range) in my 3dplot. There is no native way to do this with plot3d so I searched Maple Primes for alternative strategies. One strategy is to generate the 3d plot and the color bar(with plot3d) seperately, then combine the plots in a table so they sit side by side, using with(DocumentTools). I have been almost successful with this strategy. There remain two outstanding problems. 1. I can't re-size the table cells since there are no such options with(DocumentTools). The color bar should have a smaller cell because the figure itself is tall and thin. 2. I need to export this combined object as an image(.png) but its a table with plot objects inside, and not itself a plot object and therefore one can't simply export it as a .png like one would a typical plot object. Is there a way to export this table as a png? I am beginning to think that my idea of combining  plots with document tools and attempting the export the resulting table is not feasible. How does a normal person add a custom-color-range color bar to their plot? I'm not trying to move the earth here but it certainly feels like it.

with_document_tools_how_to_i_resize_the_cells_and_export_the_table_as_png.mw

How do I programmatically control the zoom of a 3d plot ?
SEE THE ATTACHED MAPLESHEET. In the attached code, the 'zoom out' on the blue cylinder is not conserved when I saved the maplesheet but it doesn't change the essential question which is how does one control the zoom programmatically. If you yourself adjust the zoom of the blue cylinder and the run tabulate(), you will see how it resets the plots settings to some default set of values.
How_do_I_programmatically_control_the_zoom_in_a_3d_plot.mw

restart

with(plots)

with(plottools)

with(DocumentTools)

``

Plot two cylinders with plottools and plot3d. Zoom out on the blue cylinder a little.

c1 := display(cylinder([1, 1, 1], 1, 3), orientation = [45, 70], scaling = constrained, color = red, size = [300, 300])

 

c2 := display(cylinder([1, 1, 1], 1, 3), orientation = [45, 70], scaling = constrained, color = blue, size = [300, 300])

 

Use tablate to embed the 3d plots in a visual array, for reasons not discussed here.

NULL

DocumentTools:-Tabulate([c1, c2], exterior = none, interior = none)

"Tabulate4"

(1)

Notice how the use of tabulate( ), changes the zoom of the individual plots to some default. There are two questions: 1. How do I programmatically control the zoom of a 3d plot with display( )? I don't want to have to click buttons with the mouse to arrive at my ideal zoom level. 2. How do I programmatically control the zoom of a 3d plot when using Tabulate( ) which envokes the default plot settings?  

Below is a screenshot of the zoom buttons I want to control programmatically.
NULL

NULL


Download How_do_I_programmatically_control_the_zoom_in_a_3d_plot.mw
1. Plot two cylinders with plottools and plot3d. Zoom out on the blue cylinder a little.
2. Use tablate to embed the 3d plots in a visual array, for reasons not discussed here.

3. Notice how the use of tabulate( ), changes the zoom of the individual plots to some default. There are two questions: 1. How do I programmatically control the zoom of a 3d plot with display( )? I don't want to have to click buttons with the mouse to arrive at my ideal zoom level. 2. How do I programmatically control the zoom of a 3d plot when using Tabulate( ) which envokes the default plot settings

Below is a screenshot of the zoom buttons I want to control programmatically.

1 2 3 4 5 6 Page 2 of 6