<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Python visual on the Service doesn't render as in PBI Desktop in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479191#M44946</link>
    <description>&lt;P&gt;My understanding is that you need a personal gateway set up, and running, to see these visuals in the workspace.&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 15:02:03 GMT</pubDate>
    <dc:creator>lbendlin</dc:creator>
    <dc:date>2023-10-16T15:02:03Z</dc:date>
    <item>
      <title>Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3476125#M44922</link>
      <description>&lt;P&gt;I'm trying to post a 3D scatter plot on the Service but I am getting the error. If I remove the ax formatting I get it, but it's not what I expect.&lt;/P&gt;&lt;P&gt;Does anyone know any alternative?&lt;/P&gt;&lt;P&gt;Below is the error message, a screenshot of how it beautifully looks on Desktop and what I could get on the Service.&lt;/P&gt;&lt;P&gt;&lt;EM&gt;To replicate it I am providing the M code to generate the data and the Python viz (ax formatting lines commented with #).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Script Runtime Error&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;fig.add_axes(ax)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;[S-ecccd5b8-55de-460e-b32a-be84188e4e5c]NotImplementedError: It is not currently possible to manually set the aspect on 3D axes&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="1 2 3 4 5 6 7"&gt;Please try again later or contact support. If you contact support, please provide these details.&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="On Desktop" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/980920iAF75A85101D1AFBB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3D Scatter in PBI Desktop.png" alt="On Desktop" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;On Desktop&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="On Service, removing the ax formatting" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/980922i2E2C3104B649A92A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3D Scatter in PBI Service.png" alt="On Service, removing the ax formatting" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;On Service, removing the ax formatting&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("lZTBasMwDIZfJXiXFEqQbSm1r2kvg1IGG3Rb6KHQwQppC2XvT52uW5eAZ/8Ho0T580myZbWtWuy3h6J8XE3UVK33u6/Pn5enbns8fuyK9UtRLpvn3vUa1ltY72HNT93pXGm1mbZKKDi8rmbByIxcML2HKro9PRD5pnZ3sZPrNzHeBsMykrvGEVFMLoTJMfpdLFm5QHJNoB7kG5BvQL5N8odtMN76//vAgtkwWC2DfAH5kuTXXElfqDf8e7o3xlXva27i+u/TBfQg34J8m+QPu0GPL+64HYZ4BtNhsFwB+QLy/zZIVjqYXhP6AxrBoBFMOkJ8vmVcGIsmZNGSGY3AaARJR4jP9IwhZFJbGp/oOXKMzjH65gI=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t, Column3 = _t, Column4 = _t, Column5 = _t, Column6 = _t, Column7 = _t]),
    #"Promoted Headers" = Table.PromoteHeaders(Source, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Z", type number}, {"Y", type number}, {"X", type number}, {"Planned WT (LBS)", type number}, {"Width (IN)", type number}, {"Diam (IN)", type number}})
in
    #"Changed Type"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# The following code to create a dataframe and remove duplicated rows is always executed and acts as a preamble for your script: 

# dataset = pandas.DataFrame(Diam (IN), X, Y, Z, Width (IN), Railcar)
# dataset = dataset.drop_duplicates()

# Paste or type your script code here:

df = dataset

import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.path import Path
import numpy as np

def plot_cylinder(x, y, z, r, h, cylinder_color):

    if y == 0:
        y = r
    elif y &amp;gt; 0:
        y = y + r + 5

    
    def data_for_cylinder_along_z(center_x,center_y,radius,height_z):
        z = np.linspace(0, height_z, 50)
        theta = np.linspace(0, 2*np.pi, 50)
        theta_grid, z_grid=np.meshgrid(theta, z + h)
        x_grid = radius*np.cos(theta_grid) + center_x
        y_grid = radius*np.sin(theta_grid) + center_y
        return x_grid,y_grid,z_grid
    
    Xc,Yc,Zc = data_for_cylinder_along_z(x+r, y, r, z)
    ax.plot_surface(Xc,Yc,Zc, 
                    alpha=0.95,
                    color= cylinder_color,
                    #cmap='Set1',
                    rstride=3, 
                    cstride=3
                   )


fig = plt.figure(figsize=(7,4))
ax = Axes3D(fig)
fig.add_axes(ax)

#ax.set_xlim3d(0, 600)
#ax.set_ylim3d(0, 108)
#ax.set_zlim3d(0, 154)

#ax.set_zticks(np.arange(0, 154, step=10))
#ax.zaxis.set_tick_params(labelsize=5)

#ax.set_yticks(np.arange(0, 108, step=25))
#ax.yaxis.set_tick_params(labelsize=5)

#ax.set_xticks(np.arange(0, 600, step=25))
#ax.xaxis.set_tick_params(labelsize=5)

#ax.set_aspect('equal', adjustable='box')

for i, row in df.iterrows():
    
    plot_cylinder(
        int(row['X']), 
        int(row['Z']),
        int(row['Width (IN)']),
        int(row['Diam (IN)']) / 2,
        int(row['Y']),
        row['Color.1']
    )

ax.view_init(30, -40)

plt.show()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Oct 2023 17:42:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3476125#M44922</guid>
      <dc:creator>J_Castro</dc:creator>
      <dc:date>2023-10-13T17:42:10Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3477573#M44930</link>
      <description>&lt;P&gt;Are you running the Personal Gateway on your PC?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, your sample data gives me this:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1697411837459.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/981320iC95967C7D7D390EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1697411837459.png" alt="lbendlin_0-1697411837459.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Oct 2023 23:17:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3477573#M44930</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-15T23:17:21Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479064#M44942</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/100342"&gt;@lbendlin&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I just published to My Workspace to test. No gateway setup yet.&lt;/P&gt;&lt;P&gt;I would like to have the output like this, in a &lt;EM&gt;rectangular&lt;/EM&gt; aspect ratio, not a square.&lt;/P&gt;&lt;P&gt;Please try &lt;U&gt;un&lt;/U&gt;commenting the lines in the Python viz code to see if you get the same error I got on the Service.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="3D Scatter in PBI Desktop.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/975105i5C515F98610A63C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="3D Scatter in PBI Desktop.png" alt="3D Scatter in PBI Desktop.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 14:02:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479064#M44942</guid>
      <dc:creator>J_Castro</dc:creator>
      <dc:date>2023-10-16T14:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479191#M44946</link>
      <description>&lt;P&gt;My understanding is that you need a personal gateway set up, and running, to see these visuals in the workspace.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 15:02:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479191#M44946</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-16T15:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479457#M44952</link>
      <description>&lt;P&gt;I can see it in the workspace. It just doesn't render when I use the ax formatting properties and methods &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 17:33:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479457#M44952</guid>
      <dc:creator>J_Castro</dc:creator>
      <dc:date>2023-10-16T17:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479850#M44957</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1697498912371.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/981892i7B4B7E4C5F9FEDEE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1697498912371.png" alt="lbendlin_0-1697498912371.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Setting it to "auto"&amp;nbsp; i get this in the desktop&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_0-1697499177659.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/981895i382ED4C5E3212D34/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_0-1697499177659.png" alt="lbendlin_0-1697499177659.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and this in the service&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lbendlin_1-1697499197331.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/981896iC04CCEEC614B2639/image-size/medium?v=v2&amp;amp;px=400" role="button" title="lbendlin_1-1697499197331.png" alt="lbendlin_1-1697499197331.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 23:33:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3479850#M44957</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-16T23:33:24Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3480987#M44961</link>
      <description>&lt;P&gt;It looks a little better, but not quite what I wanted/expected.&lt;/P&gt;&lt;P&gt;Am I right in affirming there is no way yet of keeping the real proportions among the axes?&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 11:45:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3480987#M44961</guid>
      <dc:creator>J_Castro</dc:creator>
      <dc:date>2023-10-17T11:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Python visual on the Service doesn't render as in PBI Desktop</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3481053#M44963</link>
      <description>&lt;P&gt;Don't know about that but there is certainly some version mismatch and/or deprecation involved.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 12:30:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Python-visual-on-the-Service-doesn-t-render-as-in-PBI-Desktop/m-p/3481053#M44963</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2023-10-17T12:30:07Z</dc:date>
    </item>
  </channel>
</rss>

