Skip to content

Commit 0e7cd3a

Browse files
committed
Removed tikzplotlib export button
1 parent 69da1d2 commit 0e7cd3a

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

src/rdplot/Widgets/MainWindow.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
from os import path
22
from os.path import sep, isfile, isdir
3-
from os import listdir
43
import csv
54
import cProfile, pstats
65

@@ -105,10 +104,6 @@ def __init__(self, ):
105104
self.save_bd_table
106105
)
107106

108-
self.actionExport_Figure_as_Tikzpicture.triggered.connect(
109-
self.plotPreview.export_plot_tikz
110-
)
111-
112107
self.actionExport_TableWidget.triggered.connect(
113108
self.export_table_to_csv
114109
)

src/rdplot/Widgets/PlotWidget.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
from matplotlib.figure import Figure
2929
from matplotlib import cbook
30-
# from scipy import spatial
30+
from scipy import spatial
3131

3232
from matplotlib import cycler
3333
from matplotlib.backends.backend_qt5agg import (
@@ -298,13 +298,6 @@ def change_plot(self, plot_data_collection, user_generated_curves=False):
298298

299299
self.plotAreaWidget.canvas.draw()
300300

301-
def export_plot_tikz(self):
302-
filename, extension = QFileDialog.getSaveFileName(self, 'Save Plot as Tikzpicture', '.', 'Latex (*.tex)')
303-
if filename != '':
304-
if '.tex' not in filename:
305-
filename += '.tex'
306-
# tikz_save(filename,self.plotAreaWidget.fig)
307-
308301
# this function enables zoom with mousewheel
309302
# see also: http://stackoverflow.com/questions/11551049/matplotlib-plot-zooming-with-scroll-wheel
310303
def on_wheel(self, event):
@@ -407,7 +400,7 @@ def __call__(self, event):
407400
# This will only be called if it's within "tolerance", anyway.
408401
x, y = event.mouseevent.xdata, event.mouseevent.ydata
409402
#catch the closest data point
410-
# x,y = event.artist.get_xydata()[spatial.KDTree(event.artist.get_xydata()).query(np.array([x, y]))[1]]
403+
x,y = event.artist.get_xydata()[spatial.KDTree(event.artist.get_xydata()).query(np.array([x, y]))[1]]
411404
annotation = self.annotations[event.artist.axes]
412405
if x is not None:
413406
if not self.display_all:

src/rdplot/ui/mainWindow.ui

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ padding: 4px;
322322
<addaction name="actionOpen_Directory_List"/>
323323
<addaction name="separator"/>
324324
<addaction name="actionSave_Table"/>
325-
<addaction name="actionExport_Figure_as_Tikzpicture"/>
326325
<addaction name="actionExport_TableWidget"/>
327326
<addaction name="separator"/>
328327
<addaction name="actionSave_Data"/>
@@ -526,11 +525,6 @@ padding: 4px;
526525
<string>About</string>
527526
</property>
528527
</action>
529-
<action name="actionExport_Figure_as_Tikzpicture">
530-
<property name="text">
531-
<string>Export Figure as Tikzpicture</string>
532-
</property>
533-
</action>
534528
<action name="actionPlaceholder">
535529
<property name="text">
536530
<string>Placeholder</string>

0 commit comments

Comments
 (0)