lt

80 Reputation

6 Badges

7 years, 100 days

MaplePrimes Activity


These are replies submitted by lt

@tomleslie This seems really to be the case. Which is why I, too, remain with the jpg and accept the bit of pixel-vision at high magnifications. But as long as it's readable on a normal A4 paper it's absolutely fine I'd say. So, I guess we can consider this topic to be closed and I thank you (all) very much for your support!

@tomleslie 

I'll stick with exporting the plots individually and work with them in the text software. By the way, I recognised that when exporting the histogram via eps and with transparencies of 0.5 so that both set of values is visible, that in the LaTeX-software they are back to transparency of full 0, so that the a small bar is really hidden. I would not have expected something like this at all from exporting with eps. So I have to stick with jpg where this does not happen. Or do you know a solution right away?

Well, half way: the plotsetup-outputs look quite ugly compared to what I have adjusted inside Maple. Will half a close look on the options for giving out what I have adjusted there. You do not know how I could mark the whole array and export it via eps/pdf directly?

@tomleslie Now I'm in heaven! All depended on the []-brackets inside display. Thank you very much!

@acer 

Yes this is done. But good point...could be easily overseen.

@tomleslie 

Unexpectedly, the `bplot` file works fine and does perfectly as told. But when using the very same order of comands

, then this error appears "Error, (in plottools:-rotate) wrong type of argument".

@tomleslie 

Misunderstanding on both sides. I thought you were not sure on how to do a histogram plot with absolute bin scale. Sorry for that. After finding out myself I wanted to share my knowledge with the best intention, as is done by many great guys here - which it seems was misunderstood by you based on my misunderstanding. So I read it at least.

Well, unfortunately, I do not get your syntax to work directly in my Maple version and so I had to copy paste the helpful parts  and figure it out in my syntax. Unfortunately, reflecting the axis does not work - btw, be assured that I try to get on with syntax research and figure out the problems myself, even after asking questions; so I've studied the plottools:-reflect(plottools:-rotate(....)); syntaxes as well but they do not work.

Concerning positioning the plots in the array. Due to axes labels on the scatter plot, the histogram plots are wider then the scatter plot and "overlap" on the side where the scatter labels are. Just adjusting the array borders does not work and I need to really mark the histogram plots inside the array frame and adjust them to match the scatter plot in the A(2,1) array frame. Hopefully, this clarifies the issue. But it's a minor. The major one remains the reflection one. So, I'll try some more.

@tomleslie 

Thank you so much for helping me with this one. For once, I can also give you some useful information in return: I found this one http://www.mapleprimes.com/questions/35926-Histogram-Plotting-In-Maple concerning plotting absolute bin height numbers. It's the option "frequencyscale=absolute" and just add it to the other histogram options.

My last problem now is, that when I rotate the histogram in A(2,2), then the histogram axis parallel to the scatter plot y-axis turns to negative.

Only two questions left:

I try to make a histogram dualaxisplot now with the frequencyscale=absolute on the left and a relative axis on the right - or vice-versa. Any suggestion?

Concerning the axes, I think I still need all the axes displayed, because I can't find a way how to individually move and stretch/squeeze the histogramplots; so if I just switch of an axis, then it is not comparable anymore to the scatterplot axis. Suggestion for individually adjusting histogram positions?

The second scatter histogram is done. In addition to the three problems above it would be good if the figures would be aligned such that the histogram axes (not the histogram height axes) can be directly compared to the axes of the scatter plot. Moreover, the bars and axes do not yet make much sense in the sense that they do not yet show two data sets, and that the height bar neither shows integer numbers for the bars, nor can they be interpreted in a fractional way of 100%. But we are getting close. AtmWorksheet2.mw

@tomleslie :)

Thank you both. I am trying now to combine your syntax with my data and what I already have.

1.) Is it possible that the array grid is not displayed?

2.) I have a two data sets and would like to have them plotted in the same scatter plot. This I achieved. But how can this be done for the histograms? Either an overlapping with transparence=0.5 bars or two different color bars besides each other for the same data bin. Unfortunately, this syntax gives some error messages in Maple13 http://www.mapleprimes.com/questions/204237-Plotting-Histograms-In-Maple . Error messages:

Error, Got internal error in Typesetting:-Parse : "Statistics is not a command in the Student package"

when this student-package is deleted (as the statistics package is still there):

Error, (in Statistics:-Histogram) deduced size of the data range is 0; try to specify the desired data range or use option discrete = true
Error, (in Statistics:-Histogram) deduced size of the data range is 0; try to specify the desired data range or use option discrete = true
Error, (in plots:-display) expecting plot structures but received: [P1, P2]

3.) Is it also possible that only the numbers for the height of the bars is shown but not the numbers of the other axis (as they can be  directly drawn from the scatter plot)?

This in the attachement would be my syntax so far. AtmWorksheet.mw

One can export the graphics as Windows Metafile and convert the .wmf into .eps by using Metafile2eps.exe . The final image is much better than the original .eps export - especially if the graphics is enlarged before the process in Maple - but still shows some Paint-like artefacts when zooming into the final .pdf file - so it's not a true vector graphic, but it can be emergency solution.

@Carl Love 

Sorry, the question went lost. I try to move the labels to other coordinates then the default ones. I tried textplot3d(...,[some x-coordinate, some y-coordinate, some z-coordinate, name of the label]) but unfortunately it does not work.

@Kitonum 

This is really great effort for showing how filling closed spacecurves can be done!

Still, unfortunately, I am not able to get it running within my code. I added my worksheet. At the beginning I added the spacecurve elements into a list. Afterwards follow the equations how these elements should be handled to form the individual spacecuves and each spacecurve result is given an array entry. The spacecurve label is also assigned to an array entry. This list of array entries is converted into plottable form and at the end the plot is done. You see that I tried to implement your syntax before the array labels. The space between the MABin (spacecurve pic[5]) and MABout (spacecurve pic[6]) should be filled light brown. At the end I tried to plot the pic list, C1, C2, and S, as you suggested. Unfortunately, it does not work yet.

restart

with(linalg):

with(plots):

with(plottools):

P1 := matrix([[cos(omega[j]), -sin(omega[j]), 0], [sin(omega[j]), cos(omega[j]), 0], [0, 0, 1]]); P2 := matrix([[1, 0, 0], [0, cos(i[j]), -sin(i[j])], [0, sin(i[j]), cos(i[j])]]); P3 := matrix([[cos(Omega[j]), -sin(Omega[j]), 0], [sin(Omega[j]), cos(Omega[j]), 0], [0, 0, 1]])

P1 := Matrix(3, 3, {(1, 1) = cos(omega[j]), (1, 2) = -sin(omega[j]), (1, 3) = 0, (2, 1) = sin(omega[j]), (2, 2) = cos(omega[j]), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

 

P2 := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(i[j]), (2, 3) = -sin(i[j]), (3, 1) = 0, (3, 2) = sin(i[j]), (3, 3) = cos(i[j])})

 

array( 1 .. 3, 1 .. 3, [( 2, 3 ) = (0), ( 3, 1 ) = (0), ( 3, 2 ) = (0), ( 1, 1 ) = (cos(Omega[j])), ( 2, 1 ) = (sin(Omega[j])), ( 3, 3 ) = (1), ( 1, 3 ) = (0), ( 2, 2 ) = (cos(Omega[j])), ( 1, 2 ) = (-sin(Omega[j]))  ] )

(1)

A := matrix([[a[j]*(cos(E[j])-e[j])], [a[j]*sqrt(-e[j]^2+1)*sin(E[j])], [0]])

array( 1 .. 3, 1 .. 1, [( 3, 1 ) = (0), ( 1, 1 ) = (a[j]*(cos(E[j])-e[j])), ( 2, 1 ) = (a[j]*(1-e[j]^2)^(1/2)*sin(E[j]))  ] )

(2)

R := multiply(P3, P2, P1)

array( 1 .. 3, 1 .. 3, [( 2, 3 ) = (-cos(Omega[j])*sin(i[j])), ( 3, 1 ) = (sin(i[j])*sin(omega[j])), ( 3, 2 ) = (sin(i[j])*cos(omega[j])), ( 1, 1 ) = (cos(Omega[j])*cos(omega[j])-sin(Omega[j])*cos(i[j])*sin(omega[j])), ( 2, 1 ) = (sin(Omega[j])*cos(omega[j])+cos(Omega[j])*cos(i[j])*sin(omega[j])), ( 3, 3 ) = (cos(i[j])), ( 1, 3 ) = (sin(Omega[j])*sin(i[j])), ( 2, 2 ) = (-sin(Omega[j])*sin(omega[j])+cos(Omega[j])*cos(i[j])*cos(omega[j])), ( 1, 2 ) = (-cos(Omega[j])*sin(omega[j])-sin(Omega[j])*cos(i[j])*cos(omega[j]))  ] )

(3)

B := multiply(R, A)

array( 1 .. 3, 1 .. 1, [( 3, 1 ) = (sin(i[j])*sin(omega[j])*a[j]*(cos(E[j])-e[j])+sin(i[j])*cos(omega[j])*a[j]*(1-e[j]^2)^(1/2)*sin(E[j])), ( 1, 1 ) = ((cos(Omega[j])*cos(omega[j])-sin(Omega[j])*cos(i[j])*sin(omega[j]))*a[j]*(cos(E[j])-e[j])+(-cos(Omega[j])*sin(omega[j])-sin(Omega[j])*cos(i[j])*cos(omega[j]))*a[j]*(1-e[j]^2)^(1/2)*sin(E[j])), ( 2, 1 ) = ((sin(Omega[j])*cos(omega[j])+cos(Omega[j])*cos(i[j])*sin(omega[j]))*a[j]*(cos(E[j])-e[j])+(-sin(Omega[j])*sin(omega[j])+cos(Omega[j])*cos(i[j])*cos(omega[j]))*a[j]*(1-e[j]^2)^(1/2)*sin(E[j]))  ] )

(4)

Orbital parameters (Semi-major axis [AU], Eccentricity, Inclination[deg], Longitude of ascending node [deg], Longitude of Perihelion[deg]):

a := [.38709893, .72333199, 1.00000011, 1.52366231, 2.2, 3.2, 5.20336301, 9.53707032, 19.19126393, 30.06896348, 39.48168677]:

Degree to Radian conversion:

i := map(proc (x) options operator, arrow; convert(x, units, deg, rad) end proc, i):

for j to 11 do omega[j] := arcsin(sin(omega[j]-Omega[j])/sin(arccos(sin(i[j])*cos(omega[j]-Omega[j])))) end do:

Parameter equations:

x := array(1 .. 11):

for j to 11 do x[j] := B[1, 1]; y[j] := B[2, 1]; z[j] := B[3, 1] end do:

pic := array(1 .. 23):

for j to 11 do Colors := [black, green, blue, red, brown, brown, black, gold, violet, green, brown]; pic[j] := spacecurve([subs(E[j] = E, x[j]), subs(E[j] = E, y[j]), subs(E[j] = E, z[j])], E = 0 .. 2*Pi, color = Colors[j]) end do:

"eq1:=pic[5]: eq2:=pic[6]:  C1:=plots[spacecurve](eq1, t=0..2*Pi, color=blue, thickness=3):   C2:=plots[spacecurve](eq2, t=0..2*Pi, color=blue, thickness=3):   S:=plot3d(s*eq1+(1-s)*eq2, t=0..2*Pi, s=0..1, style=surface, color=yellow): #plots[display](map(plottools[rotate],map(plottools[translate],[C1,C2,S], 3,4,1),Pi/3,0,Pi/6), axes=normal, orientation=[-15,60]); """

Error, (in plots/spacecurv) first argument must be array, rtable, list or set

 

Error, (in plots/spacecurv) first argument must be array, rtable, list or set

 

Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct

 

pic[12] := plot3d(0.1e-1, 0 .. 2*Pi, 0 .. Pi, style = PATCHNOGRID, coords = spherical, color = red):

pic[13] := textplot3d([subs(E[1] = 0, x[1]), subs(E[1] = 0, y[1]), subs(E[1] = 0, z[1]), "Mercury"]):

pic1 := convert(pic, 'list'):

display({C1, C2, S, pic1}, scaling = CONSTRAINED)

Error, (in plots:-display) expecting plot structures but received: {C1, C2, [PLOT3D(CURVES([[0.6666414122e-1, .2996245613, 0.1835655577e-1], [0.1889037478e-1, .3066882545, 0.2331849152e-1], [-0.2947692564e-1, .3074425871, 0.2781951411e-1], [-0.7764357030e-1, .3018751730, 0.3178571689e-1], [-.1248186642, .2900774288, 0.3515197493e-1], [-.1702275937, .2722430734, 0.3786301434e-1], [-.2131247453, .2486649462, 0.3987431995e-1], [-.2528057491, .2197301995, 0.4115286617e-1], [-.2886190440, .1859139410, 0.4167765930e-1], [-.3199765768, .1477714326, 0.4144008226e-1], [-.3463634575, .1059289735, 0.4044403605e-1], [-.3673464144, 0.6107361548e-1, 0.387...

 

``


Download Worksheet_FillingSpacecuve.mw

@Carl Love 

Sure. Here it is.


restart

with(linalg):

with(plots):

with(plottools):

P1 := matrix([[cos(omega[j]), -sin(omega[j]), 0], [sin(omega[j]), cos(omega[j]), 0], [0, 0, 1]]); P2 := matrix([[1, 0, 0], [0, cos(i[j]), -sin(i[j])], [0, sin(i[j]), cos(i[j])]]); P3 := matrix([[cos(Omega[j]), -sin(Omega[j]), 0], [sin(Omega[j]), cos(Omega[j]), 0], [0, 0, 1]])

P1 := Matrix(3, 3, {(1, 1) = cos(omega[j]), (1, 2) = -sin(omega[j]), (1, 3) = 0, (2, 1) = sin(omega[j]), (2, 2) = cos(omega[j]), (2, 3) = 0, (3, 1) = 0, (3, 2) = 0, (3, 3) = 1})

 

P2 := Matrix(3, 3, {(1, 1) = 1, (1, 2) = 0, (1, 3) = 0, (2, 1) = 0, (2, 2) = cos(i[j]), (2, 3) = -sin(i[j]), (3, 1) = 0, (3, 2) = sin(i[j]), (3, 3) = cos(i[j])})

 

array( 1 .. 3, 1 .. 3, [( 2, 1 ) = (sin(Omega[j])), ( 2, 3 ) = (0), ( 2, 2 ) = (cos(Omega[j])), ( 3, 1 ) = (0), ( 1, 3 ) = (0), ( 1, 2 ) = (-sin(Omega[j])), ( 1, 1 ) = (cos(Omega[j])), ( 3, 3 ) = (1), ( 3, 2 ) = (0)  ] )

(1)

A := matrix([[a[j]*(cos(E[j])-e[j])], [a[j]*sqrt(-e[j]^2+1)*sin(E[j])], [0]])

array( 1 .. 3, 1 .. 1, [( 2, 1 ) = (a[j]*(1-e[j]^2)^(1/2)*sin(E[j])), ( 3, 1 ) = (0), ( 1, 1 ) = (a[j]*(cos(E[j])-e[j]))  ] )

(2)

R := multiply(P3, P2, P1)

array( 1 .. 3, 1 .. 3, [( 2, 1 ) = (sin(Omega[j])*cos(omega[j])+cos(Omega[j])*cos(i[j])*sin(omega[j])), ( 2, 3 ) = (-cos(Omega[j])*sin(i[j])), ( 2, 2 ) = (-sin(Omega[j])*sin(omega[j])+cos(Omega[j])*cos(i[j])*cos(omega[j])), ( 3, 1 ) = (sin(i[j])*sin(omega[j])), ( 1, 3 ) = (sin(Omega[j])*sin(i[j])), ( 1, 2 ) = (-cos(Omega[j])*sin(omega[j])-sin(Omega[j])*cos(i[j])*cos(omega[j])), ( 1, 1 ) = (cos(Omega[j])*cos(omega[j])-sin(Omega[j])*cos(i[j])*sin(omega[j])), ( 3, 3 ) = (cos(i[j])), ( 3, 2 ) = (sin(i[j])*cos(omega[j]))  ] )

(3)

B := multiply(R, A)

array( 1 .. 3, 1 .. 1, [( 2, 1 ) = ((sin(Omega[j])*cos(omega[j])+cos(Omega[j])*cos(i[j])*sin(omega[j]))*a[j]*(cos(E[j])-e[j])+(-sin(Omega[j])*sin(omega[j])+cos(Omega[j])*cos(i[j])*cos(omega[j]))*a[j]*(1-e[j]^2)^(1/2)*sin(E[j])), ( 3, 1 ) = (sin(i[j])*sin(omega[j])*a[j]*(cos(E[j])-e[j])+sin(i[j])*cos(omega[j])*a[j]*(1-e[j]^2)^(1/2)*sin(E[j])), ( 1, 1 ) = ((cos(Omega[j])*cos(omega[j])-sin(Omega[j])*cos(i[j])*sin(omega[j]))*a[j]*(cos(E[j])-e[j])+(-cos(Omega[j])*sin(omega[j])-sin(Omega[j])*cos(i[j])*cos(omega[j]))*a[j]*(1-e[j]^2)^(1/2)*sin(E[j]))  ] )

(4)

Orbital parameters (Semi-major axis [AU], Eccentricity, Inclination[deg], Longitude of ascending node [deg], Longitude of Perihelion[deg]):

a := [.38709893, .72333199, 1.00000011, 1.52366231, 2.2, 3.2, 5.20336301, 9.53707032, 19.19126393, 30.06896348, 39.48168677]:

Degree to Radian conversion:

i := map(proc (x) options operator, arrow; convert(x, units, deg, rad) end proc, i):

for j to 11 do omega[j] := arcsin(sin(omega[j]-Omega[j])/sin(arccos(sin(i[j])*cos(omega[j]-Omega[j])))) end do:

Parameter equations:

x := array(1 .. 11):

for j to 11 do x[j] := B[1, 1]; y[j] := B[2, 1]; z[j] := B[3, 1] end do:

pic := array(1 .. 23):

for j to 11 do Colors := [black, green, blue, red, brown, brown, black, gold, violet, green, brown]; pic[j] := spacecurve([subs(E[j] = E, x[j]), subs(E[j] = E, y[j]), subs(E[j] = E, z[j])], E = 0 .. 2*Pi, color = Colors[j]) end do:

pic[12] := plot3d(0.1e-1, 0 .. 2*Pi, 0 .. Pi, style = PATCHNOGRID, coords = spherical, color = red):

pic[13] := textplot3d([subs(E[1] = 0, x[1]), subs(E[1] = 0, y[1]), subs(E[1] = 0, z[1]), "Mercury"]):

pic1 := convert(pic, 'list'):

display(pic1, scaling = CONSTRAINED);

 

``


Download Worksheet_LabelCoordinates.mw

Btw, there is another of my discussions going on concerning filling the space between two spacecurves with a detailed answer already given. It doesn't yet suit to my array syntax of my 20-or-so-equations. This is what I also want to do: fill the two brown asteroid-belt spacecuves with brown colour. Maybe if you see directly how to handle it it would be most welcome; of course I go on trying myself as well.

1 2 3 Page 1 of 3