Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #30 from PCMDI/29_ljw_MoV
Browse files Browse the repository at this point in the history
bug fix
  • Loading branch information
lee1043 authored Oct 14, 2019
2 parents 922011d + bf80ce6 commit 73bedc6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions click_plots/create_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ def write_modal_html(html_file, map_element, share_pth, pathout, modal=None, tit
f.write("<p class=description>"+description+"</p>")

# toggle image button
f.write("<style>p.button {margin-left: 25px;}</style>")
f.write("<p class=button>Colormaps: ")
if toggle_image is not None:
f.write("<style>p.button {margin-left: 25px;}</style>")
f.write("<p class=button>Colormaps: ")
for name in toggle_image:
if name == "default":
png_template.colormap = ""
Expand Down
6 changes: 3 additions & 3 deletions click_plots/portrait_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ def plot(self, data, full_dic, merge=None,
meshfill.datawc_x1, meshfill.datawc_x2, meshfill.datawc_y1, meshfill.datawc_y2], png=png_file)
click_labels_y2 = vcs.utils.axisToPngCoords([], meshfill, template, 'y2', [
meshfill.datawc_x1, meshfill.datawc_x2, meshfill.datawc_y1, meshfill.datawc_y2], png=png_file)
targets_lbls_y += [
meshfill.yticlabels2[k] for k in sorted(meshfill.yticlabels2)]
targets_lbls_y = [
meshfill.yticlabels1[k] for k in sorted(meshfill.yticlabels1)]
targets_lbls_y += [
meshfill.yticlabels2[k] for k in sorted(meshfill.yticlabels2)]
click_labels_y = numpy.concatenate((click_labels_y1, click_labels_y2))

# when using multiple we have different shapes so we need to "extend"
Expand All @@ -184,7 +184,7 @@ def plot(self, data, full_dic, merge=None,
# ok less vertices in click area
click_areas = add_extra_vertices(click_areas)
if self.ylabels_tooltips_images_template is not None:
if click_areas.shape[-1] > click_labels_1.shape[-1]:
if click_areas.shape[-1] > click_labels_y.shape[-1]:
click_labels_y = add_extra_vertices(click_labels_y)
elif click_areas.shape[-1] < click_labels_y.shape[-1]:
# ok less vertices in click area
Expand Down
6 changes: 3 additions & 3 deletions share/template_bottom.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
},
"xtic2": {
"line": "default",
"priority": 1,
"priority": 0,
"y1": 0.15,
"y2": 0.45
},
Expand Down Expand Up @@ -327,7 +327,7 @@
},
"ytic2": {
"line": "default",
"priority": 1,
"priority": 0,
"x1": 0.05,
"x2": 0.85
},
Expand Down Expand Up @@ -487,4 +487,4 @@
"y": null
}
}
}
}
6 changes: 3 additions & 3 deletions share/template_top.json
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@
},
"xtic2": {
"line": "default",
"priority": 1,
"priority": 0,
"y1": 0.61,
"y2": 0.91
},
Expand Down Expand Up @@ -327,7 +327,7 @@
},
"ytic2": {
"line": "default",
"priority": 1,
"priority": 0,
"x1": 0.05,
"x2": 0.85
},
Expand Down Expand Up @@ -487,4 +487,4 @@
"y": null
}
}
}
}

0 comments on commit 73bedc6

Please sign in to comment.