Skip to content

Commit 1996bc2

Browse files
Fixes part of #3476. (#3682)
Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
1 parent 5f149c0 commit 1996bc2

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

qiskit/visualization/matplotlib.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -599,12 +599,12 @@ def _draw_regs_sub(self, n_fold, feedline_l=False, feedline_r=False):
599599
else:
600600
label = qreg['label']
601601
y = qreg['y'] - n_fold * (self._cond['n_lines'] + 1)
602-
self.ax.text(self.x_offset, y, label, ha='right', va='center',
602+
self.ax.text(self.x_offset - 0.2, y, label, ha='right', va='center',
603603
fontsize=1.25 * self._style.fs,
604604
color=self._style.tc,
605605
clip_on=True,
606606
zorder=PORDER_TEXT)
607-
self._line([self.x_offset + 0.5, y], [self._cond['xmax'], y],
607+
self._line([self.x_offset + 0.2, y], [self._cond['xmax'], y],
608608
zorder=PORDER_REGLINE)
609609
# classical register
610610
this_creg_dict = {}
@@ -630,20 +630,20 @@ def _draw_regs_sub(self, n_fold, feedline_l=False, feedline_r=False):
630630
color=self._style.tc,
631631
clip_on=True,
632632
zorder=PORDER_TEXT)
633-
self.ax.text(self.x_offset, y, this_creg['label'], ha='right', va='center',
633+
self.ax.text(self.x_offset - 0.2, y, this_creg['label'], ha='right', va='center',
634634
fontsize=1.5 * self._style.fs,
635635
color=self._style.tc,
636636
clip_on=True,
637637
zorder=PORDER_TEXT)
638-
self._line([self.x_offset + 0.5, y], [self._cond['xmax'], y], lc=self._style.cc,
638+
self._line([self.x_offset + 0.2, y], [self._cond['xmax'], y], lc=self._style.cc,
639639
ls=self._style.cline, zorder=PORDER_REGLINE)
640640

641641
# lf line
642642
if feedline_r:
643-
self._linefeed_mark((self.fold + 1 - 0.1,
643+
self._linefeed_mark((self.fold + self.x_offset + 1 - 0.1,
644644
- n_fold * (self._cond['n_lines'] + 1)))
645645
if feedline_l:
646-
self._linefeed_mark((0.1,
646+
self._linefeed_mark((self.x_offset + 0.3,
647647
- n_fold * (self._cond['n_lines'] + 1)))
648648

649649
def _draw_ops(self, verbose=False):
Loading
Loading

0 commit comments

Comments
 (0)