Skip to content

Commit

Permalink
updated bits to work with topgate paper
Browse files Browse the repository at this point in the history
  • Loading branch information
leobrowning92 committed Mar 19, 2018
1 parent 94f0887 commit 13c5984
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion afmdensityplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ def plot_segments(ax, segs=np.array([[[1,2],[2,2]]]) ):
line_segments = LineCollection(segs,linewidth=0.8,colors='b')
ax.add_collection(line_segments)
def plot_tubes(ax,segs,junctions):
ax.scatter(junctions[:,0],junctions[:,1],c="r", s=30, linewidth=0.8, marker="x")
plot_segments(ax,segs)
ax.scatter(junctions[:,0],junctions[:,1],c="c", s=30, linewidth=2, marker="x")

def check_intersect(s1,s2):
#assert that x intervals overlap
if max(s1[:,0])<min(s2[:,0]):
Expand Down
7 changes: 4 additions & 3 deletions fetplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,13 @@ def updownplot(x,y,**kwargs):

def tile_data(df, column=None,row='device', color="fabstep",
colwrap=None, show=True, save=False, v=False, xlim="", ylim="", sharey=True, x="VG", y="ID", log=True, updown=False, palette=hls,
col_order=None, hue_order=None, ls='-', marker='', xlabel='', ylabel='', fontscale=1, close=False):
col_order=None, hue_order=None, ls='-', marker='', xlabel='', ylabel='', fontscale=1, close=False,hue_kws=None,legend=True):
if v:
print("dataframe pre tile_data()")
get_info(df)
sns.set(style="ticks",font_scale=fontscale,palette=palette)
# Initialize a grid of plots with an Axes for each walk
grid = sns.FacetGrid(df, col=column, hue=color,row=row, col_wrap=colwrap, size=4,sharey=sharey, col_order=col_order, hue_order=hue_order,legend_out=True)
grid = sns.FacetGrid(df, col=column, hue=color,row=row, col_wrap=colwrap, size=4,sharey=sharey, col_order=col_order, hue_order=hue_order,legend_out=True,hue_kws=hue_kws)
# Draw a line plot to show the trajectory of each random walk
if updown:
grid.map(updownplot, x, y,ls=ls,marker=marker)
Expand All @@ -247,7 +247,8 @@ def tile_data(df, column=None,row='device', color="fabstep",
grid.set(ylim=ylim)
if xlabel and ylabel:
grid.set_axis_labels(xlabel, ylabel)
plt.legend(loc='best', fancybox=True, framealpha=0.5)
if legend:
plt.legend(loc='best', fancybox=True, framealpha=0.5)
# Adjust the arrangement of the plots
# grid.fig.tight_layout(w_pad=1)
# sns.plt.legend(loc='upper left',bbox_to_anchor=(1,0.5))
Expand Down

0 comments on commit 13c5984

Please sign in to comment.