Skip to content

Commit

Permalink
Update graph style
Browse files Browse the repository at this point in the history
  • Loading branch information
manuvarkey committed Oct 9, 2023
1 parent 7c7d47d commit b973238
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions gelectrical/view/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def plot_graph(self):

self.plot.grid(True, which='major', alpha=0.3, color=misc.COLOR_GRID)
self.plot.minorticks_on()
self.plot.grid(True, which='minor', alpha=0.1, color=misc.COLOR_GRID)
# self.plot.grid(True, which='minor', alpha=0.1, color=misc.COLOR_GRID)

if 'marker' in self.graph_params and not self.graph_params['marker']:
opt_marker = ''
Expand All @@ -112,11 +112,9 @@ def plot_graph(self):
marker=opt_marker, markersize=4, color=color)
elif model.mode == misc.GRAPH_DATATYPE_POLYGON:
self.plot.fill(model.xval, model.yval, label=model.title,
color=color, edgecolor=misc.COLOR_NORMAL, linewidth=1,
alpha=0.5, hatch='////')
color=color, alpha=0.2)
self.plot.fill(model.xval, model.yval,
color='none', edgecolor=misc.COLOR_NORMAL, linewidth=1,
alpha=0.5)
color='none', edgecolor=color, linewidth=2)
elif model.mode == misc.GRAPH_DATATYPE_MARKER:
self.plot.plot(model.xval, model.yval, label=model.title, color=color,
linestyle='dashed', linewidth=1)
Expand Down Expand Up @@ -280,20 +278,18 @@ def plot_curves(self):
color = self.colors[slno % len(self.colors)]
if model.mode == misc.GRAPH_DATATYPE_PROFILE:
self.plot.plot(model.xval, model.yval, label=model.title,
marker=opt_marker, color=color)
marker=opt_marker, color=color, linewidth=2)
elif model.mode == misc.GRAPH_DATATYPE_FREE:
self.plot.scatter(model.xval, model.yval, label=model.title,
marker=opt_marker, color=color)
elif model.mode == misc.GRAPH_DATATYPE_POLYGON:
self.plot.fill(model.xval, model.yval, label=model.title,
color=color, edgecolor=misc.COLOR_NORMAL, linewidth=1,
alpha=0.5, hatch='////')
color=color, alpha=0.2, hatch='////')
self.plot.fill(model.xval, model.yval,
color='none', edgecolor=misc.COLOR_NORMAL, linewidth=1,
alpha=0.5)
color='none', edgecolor=color, linewidth=2)
elif model.mode == misc.GRAPH_DATATYPE_MARKER:
self.plot.plot(model.xval, model.yval, label=model.title, color=color,
linestyle='dashed', linewidth=1)
linestyle='dashed', linewidth=2)
# Set legends title and stuff
if len(self.models) > 1:
self.plot.legend(prop={'family':misc.GRAPH_FONT_FACE, 'size':misc.GRAPH_FONT_SIZE})
Expand Down

0 comments on commit b973238

Please sign in to comment.