question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Trouble using plots with TabPy

See original GitHub issue

I would like to be able to use plots created in Python (i.e. plots generated from matplotlib or seaborn) in my Tableau workbooks. See the below code in my attempt to make a simple sine plot and show it in a Tableau workbook.

`import json import base64 import numpy as np import math import matplotlib.pyplot as plt from tabpy.tabpy_tools.client import Client connection = Client(‘http://localhost:9004/’)

def SinePlot(freq, amp): x = np.array(np.linspace(1,100,100)) y = []
for i in range(len(x)): y_i = math.sin(x[i]) y.append(y_i) i += 1 fig = plt.figure() ax = plt.subplot(111) ax.plot(x, y) plt.title(‘Sine Wave’) plt.legend(‘sin’) fig.savefig(‘plot.png’) data = {} with open(‘plot.png’, mode=‘rb’) as file: img = file.read() data[‘img’] = base64.encodebytes(img).decode(“utf-8”)
answer = json.dumps(data) return answer

connection.deploy(‘SinePlot Func’, SinePlot, ‘Plots a sine wave’, override = True)

print(‘done’)`

sine plot test

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
0golovatyicommented, Feb 20, 2020

@ethantjones97 Are you trying to deploy a function for TabPy or call it later from Tableau? What are the steps or an example you are following?

0reactions
nmannheimercommented, Mar 2, 2020

@ethantjones97 this isn’t something that’s currently on the roadmap, but it’s an interesting idea and certainly something that exists in other products. How would you use that capability if you had it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using TabPy to Blend Python with Tableau: 4 Easy Steps
Installing and Running TabPy​​ Select “Manage Analytics Extension Connection“. In the pop-up window, set up the Server and Port. Select “TabPy/ ...
Read more >
How to use Tabpy to do plotting - Tableau Community
What I am trying to do here is to import the matplot.lib from python and try to do the plotting. It shows that...
Read more >
Tableau Training - TabPy Tutorial For Beginners - YouTube
Edureka Tableau Certification Training : https://www.edureka.co/tableau-certification-training ( Use ...
Read more >
Tableau Training - TabPy Tutorial For Beginners - YouTube
This Edureka tutorial on " TabPy Tutorial For Beginners " is to ... Technical Support to help you with any problems you might...
Read more >
Data science applications with TabPy/R - YouTube
In this session, we will learn how to deploy connections between Tableau and its advanced analytics external services.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found